c# - Selenium Webdriver wait on element click? -


i have been searching solution this, no avail. have button i'm clicking, taking long while return data, , driver timing out , killing app guess.

i trying use webdriverwait class accomplish this, click() method not available in way i'm using it.

webdriverwait wait = new webdriverwait(browser, new timespan(0, 5, 0));  bool clicked = wait.until<bool>((elem) => {      elem.click(); //doesn't work      return true; }); 

the implicitlywait() method waiting elements load, times out on click(), can't element.

the setscripttimeout() method works executing javascript, i'm not doing.

does know of way this?

try :

webdriverwait wait = new webdriverwait(driver , 1000) ; wait.until(excepctedconditions.elementtobeclickable(byid("element")); 

element can id of element present on next page redirected . once page loads start executing code .


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -