Timeline for WaitFor method for website automation testing with Selenium WebDriver
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 3, 2021 at 17:29 | comment | added | Michael Rieger |
the closest thing for immediate results is FindElements which returns a collection. then check the count.
|
|
Sep 3, 2021 at 17:27 | comment | added | Peter Csala | Quite frankly I haven't used the .net library. I've used the js lib several years ago. I assumed that the FindElement is instant, it does not wait for a particular time. With that in mind my design has that problem that you have described. Thanks for pointing out. Is there a FindElementAsync method which receives a cancellationToken? | |
Sep 3, 2021 at 16:37 | comment | added | Michael Rieger |
from your DoesElementExist method there is a small trap, FindElement uses the drivers search wait time and sit there until it times out or finds it. if your timeout in in minuets and the calling functions timeout may be in assumed seconds. but remainingSeconds in your example is just a counter for number of attempts to recheck. as is .... if you set waitUntilInSeconds to 20, driver timeout is 30 seconds, then if we never find the control, we sit here 620 seconds
|
|
Sep 2, 2021 at 23:59 | vote | accept | JimmyHu | ||
Sep 2, 2021 at 16:12 | history | edited | Peter Csala | CC BY-SA 4.0 |
added 2 characters in body
|
Sep 2, 2021 at 7:26 | history | answered | Peter Csala | CC BY-SA 4.0 |