java - How to wait for ajax load before performing any activity in selenium webdriver? -


how wait ajax load before performing activity in selenium webdriver? have form fill form fields through script , click on button , next form opened , few fields prepopulated last form filled, want wait on form form gets filled , after next script runs ie until ajax loads. using java.

i think wait until used not sure how use this. or if there other solution kindly suggest..

you can use waitforcondition method explained in this post.

ultimately you'll end timeout or test may never complete. example:

public void waitforjquery() {     webdriverbackedselenium webdriverbackedselenium = new webdriverbackedselenium(driver, driver.getcurrenturl());     webdriverbackedselenium.waitforcondition("(typeof(sjq)==='undefined') || sjq.active == 0", javascript_timeout); } 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -