#26048 closed Cleanup/optimization (fixed)
Switch selenium tests to use implicitly_wait() instead of custom wait functions.
Reported by: | Tim Graham | Owned by: | Tim Graham |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Florian Apolloner | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
From the selenium docs, "Dependent on several factors, including the OS/Browser combination, WebDriver may or may not wait for the page to load. In some circumstances, WebDriver may return control before the page has finished, or even started, loading. To ensure robustness, you need to wait for the element(s) to exist in the page using Explicit and Implicit Waits."
Currently, we have a collection of wait_for* methods to accomplish this. The idea is to switch our code to call self.selenium.implicitly_wait(10)
after initializing self.selenium
which should allow us to remove many of these waiting calls.
Change History (7)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 9 years ago
Cc: | added |
---|---|
Has patch: | set |
PR. Unfortunately, I think we still need to keep some waits after actions like clicks if they aren't followed by other selenium queries.
comment:5 by , 9 years ago
That is not so unfortunate, at least now we should be able to know when to add them ;)
In b2cddeaa: