How to detect in selenium whether loading of a javascript file is loaded via ajax?
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 click开发者_运维知识库able ?
Because otherwise click event is failing. Though element is present But its not clickable. Its sumple anchor like Link
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.
精彩评论