3

My main page loading another page via ajax. Which has javascript file. How do i detect whether that ajax page loading is completed in selenium ? I can check for element loaded. But there are links which are not clickable till that javascript file in inner page is loaded completely. How do i make sure those links are not clickable ?

Because otherwise click event is failing. Though element is present But its not clickable. Its sumple anchor like Link

1 Answer 1

2

There is no inbuilt mechanism in selenium to detect ajax requests. Selenium 2 has this in road map. Add waitForcondition in selenium.

selenium.browserbot.getUserWindow().$.active== 0

NOTE: This works if your page uses jquery. For other frameworks..there are different ways replace $.active with something else.

Sign up to request clarification or add additional context in comments.

2 Comments

I think this only works for the IDE. To get this to work elsewhere try this: 'selenium.browserbot.getCurrentWindow().jQuery.active == 0'
Is the browserbot object part of the c# web driver?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.