(C# Selenium) How to wait until an element is present? -
i new selenium, started using yesterday , pretty done first part of project , love way going.
altho having 1 problem, using thread.sleep pauses until elements present. there animations going on or slow loading @ times, how can make wait until element present , interact it?
for example:
loginpageelements loginpage = new loginpageelements(); loginpage.continuelink.click(); thread.sleep(5000); //here has wait until next page loads clickdailybonuspopup(); driver.driver.navigate().gotourl(.....); thread.sleep(2000); //here has wait until login form pops loginformelements loginform = new loginformelements(); loginform.userpasswordlogin.click(); thread.sleep(2000); //here has wait until different login form pops
you need use webdriverwait class. here solution problem.
Comments
Post a Comment