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?
WebDriverWaiteach time. Selenium has no idea about when you need to wait for an element to be in a specific state before it's usable. That's why the option is there. Besides, an implicit is going to wait until the element is found. An element being found is not equal to an element being usable. - Arranimplicitly_waitis in the API at all! How would you check for an element being usable? I seeexpected_conditions.element_to_be_clickablebut not sure what else I'd use. - KnewB