sikuli - Is there any way in Selenium 2 where the script should know that web-page is Loading and hence it should wait? -


i have situation using sikuli detect image. in case image displayed web-page still shows loading.so when sikuli tries click on image not selects image script gets pass though have not selected image.any suggestion. how can handle situation?

i assuming can use selenium webdriver. if case selenium should wait untill page loads. being said, can use following code see if page loads.

int count = 0 ;  string state = ""; {     state = ((javascriptexecutor)driver).executescript("return document.readystate");     thread.sleep(3000); } while ((!state.equals("complete"))&&count<15); 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -