java - Am automating a webpage which take time to load a page on clicking a link. Tried implicit and explicit waits,it is not working.Any other suggestions? -


driver.findelement(by.xpath("xxxx")).click(); 

clicking on above link take page. take long time. while trying find element in resulting page shows error.

driver.findelement(by.xpath("yy")).gettext(); 

i have tried implicit , explicit waits, not working everytime.

use webdriver wait. put element need in 2nd page. feel free change locator in below code :-

webdriverwait wait = new webdriverwait(driver, 100); webelement element = wait.until(expectedconditions.elementtobeclickable(by.id("someid"))); 

hope :)


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -