The docs say:
An implicit wait is to tell WebDriver to poll the DOM for a certain amount of time when trying to find an element or elements if they are not immediately available.
Sub-question:
In the case of find_elements_by_
(plural), how many elements does implicit_wait
wait for to exist before continuing with your script? Or does implicit_wait
only work with find_element_by_
(singular)? If so what do the docs mean by "or elements"?
From an SO answer I read that it's best not to use both implicit and explicit waits in the same script, which I took notice of as I'd like the tests to be as robust as possible.
Since I know there are times I'll definitely need WebDriverWait
, does this mean I need to get rid of implicit_wait
in my unittest
setUp
method and instead employ WebDriverWait
every single time I use any find_element_by_
method?
(I'd rather not have to do this; although I suppose I could put each of the find_element_by_
methods in my own custom functions -each wrapped in their own WebDriverWait
-it feels like I shouldn't have to).
So my main question is:
Can I instead keep my implicit_wait
in my test setUp
method, and then only use WebDriverWait
when it comes to find_elements_by_
and other places where I know I need it?