Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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 Tim Graham)

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 Tim Graham, 8 years ago

Description: modified (diff)

comment:2 by Tim Graham <timograham@…>, 8 years ago

In b2cddeaa:

Refs #26048 -- Fixed a flaky i18n selenium test: test_javascript_gettext.

comment:3 by Tim Graham, 8 years ago

Owner: changed from nobody to Tim Graham
Status: newassigned

comment:4 by Tim Graham, 8 years ago

Cc: Florian Apolloner 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 Florian Apolloner, 8 years ago

That is not so unfortunate, at least now we should be able to know when to add them ;)

comment:6 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 294d0d8:

Fixed #26048 -- Made admin selenium tests use implicitly_wait()

comment:7 by Tim Graham <timograham@…>, 8 years ago

In 3486311:

Refs #26048 -- Fixed a flaky selenium test.

Note: See TracTickets for help on using tickets.
Back to Top