Opened 9 years ago

Closed 9 years ago

#26577 closed Cleanup/optimization (fixed)

Usage of `implicitly_wait` in selenium tests can slow down tests quite a bit.

Reported by: Simon Charette Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

While reviewing #26575 I noticed that some find_elements_by_css_selector were taking forever to execute (10 seconds) and I realized it was related to #26048.

One example is when AdminSeleniumTestCase.assertSelectOptions is used to assert that no options are present (assertSelectOptions('#select', []). In this case the find_elements_by_css_selector('#select > option') call blocks for 10 seconds as no options are present in the select.

Since there's no way to specify an explicit timeout argument to the find_elements methods I think we'll have to issue an implicitly_wait(0) before calling them. Ideally we would use an explicit wait with an appropriate condition if values == [] but I can't find how to bypass the implicit wait when calling find_elements methods.

Change History (3)

comment:1 by Simon Charette, 9 years ago

Has patch: set

comment:2 by Tim Graham, 9 years ago

Triage Stage: AcceptedReady for checkin

comment:3 by Simon Charette <charettes@…>, 9 years ago

Resolution: fixed
Status: newclosed

In ad0f536e:

Fixed #26577 -- Disabled implicit wait of Selenium tests where appropriate.

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