[Django] #29892: Multiple Selenium test failures in Firefox

18 views
Skip to first unread message

Django

unread,
Oct 25, 2018, 2:32:00 PM10/25/18
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
---------------------------------------------+------------------------
Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
When running the Selenium tests on master with the latest Firefox (63)
installed on MacOS 10.14 I get the following tests failing:


{{{
test_textarea_trailing_newlines
(forms_tests.tests.test_widgets.LiveWidgetTests)
test_select (admin_views.test_autocomplete_view.SeleniumTests)
test_prepopulated_fields (admin_views.tests.SeleniumTests)
test_date_time_picker_shortcuts
(admin_widgets.tests.DateTimePickerAltTimezoneSeleniumTests)
test_date_time_picker_shortcuts
(admin_widgets.tests.DateTimePickerShortcutsSeleniumTests)
test_select_multiple (admin_views.test_autocomplete_view.SeleniumTests)
test_first_field_focus (admin_views.tests.SeleniumTests)
}}}

Two of these failures do not appear at first to be related to the browser
itself, however interestingly enough they do not fail on Chrome at all and
reliably fail on Firefox.

I've also attached full stacktraces below.

--
Ticket URL: <https://code.djangoproject.com/ticket/29892>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 25, 2018, 2:32:20 PM10/25/18
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+--------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Tom Forbes):

* Attachment "failures.txt" added.

Django

unread,
Oct 25, 2018, 2:39:34 PM10/25/18
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+--------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------

Comment (by Simon Charette):

FWIW I had to disable selenium tests on a lot of projects on FF since they
moved to WebDriver as it broke a lot of stuff.

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:1>

Django

unread,
Oct 25, 2018, 2:49:29 PM10/25/18
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+--------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => needsinfo


Comment:

Yes, the selenium tests haven't worked on Firefox since the switch to
geckodriver. Feel free to reopen and submit a patch if you find that
Django is at fault.

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:2>

Django

unread,
Oct 25, 2018, 2:55:00 PM10/25/18
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+--------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------

Comment (by Tom Forbes):

Ok, thanks for the info. If I have time to investigate I will look into
the two Python failures as they are the most suspicious.

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:3>

Django

unread,
Nov 26, 2019, 7:43:10 AM11/26/19
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+--------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Jon Dufresne):

* cc: jon.dufresne@… (added)


Comment:

I think some of the failures are due to the behavior described in
https://github.com/mozilla/geckodriver/issues/878 That is, the current
page isn't invalidated after a `.submit()` call so selenium driver doesn't
wait for a page reload.

If I understand the Firefox people correctly, `Element.submit()` should
not be used as it isn't a WebDriver primitive.

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:4>

Django

unread,
Nov 26, 2019, 8:04:35 AM11/26/19
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+--------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Jon Dufresne):

* has_patch: 0 => 1


Comment:

PR https://github.com/django/django/pull/12147 for tests:

{{{
test_date_time_picker_shortcuts
(admin_widgets.tests.DateTimePickerAltTimezoneSeleniumTests)
test_date_time_picker_shortcuts
(admin_widgets.tests.DateTimePickerShortcutsSeleniumTests)
}}}

(I think this ticket should be reopened.)

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:5>

Django

unread,
Nov 26, 2019, 8:08:37 PM11/26/19
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Jon Dufresne):

* status: closed => new
* resolution: needsinfo =>
* stage: Unreviewed => Accepted


Comment:

PR to fix all tests with Firefox.

https://github.com/django/django/pull/12149

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:6>

Django

unread,
Nov 28, 2019, 3:25:11 AM11/28/19
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"f0ed38edf33947fad539d43b7b3fbabf82816518" f0ed38ed]:
{{{
#!CommitTicketReference repository=""
revision="f0ed38edf33947fad539d43b7b3fbabf82816518"
Refs #29892 -- Replaced Selenium .submit() shim with .click() on the
submit button.

There is no WebDriver submit primitive. The Selenium project implements
it as a convenience only. The geckodriver developers recommend against
using it. Replace it with a real primitive, click on the submit button.

Fixes failing Seleninum test test_date_time_picker_shortcuts when using
the Firefox Selenium driver.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:7>

Django

unread,
Nov 28, 2019, 5:23:30 AM11/28/19
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Carlton Gibson <carlton.gibson@…>):

* status: new => closed

* resolution: => fixed


Comment:

In [changeset:"875e3ff4fd883e11008ca9dfcf02b8314c57c0a6" 875e3ff4]:
{{{
#!CommitTicketReference repository=""
revision="875e3ff4fd883e11008ca9dfcf02b8314c57c0a6"
Fixed #29892 -- Added .wait_page_loaded() in
SeleniumTests.test_first_field_focus().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:8>

Django

unread,
Nov 28, 2019, 9:26:51 AM11/28/19
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-----------------------------------+------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Carlton Gibson):

* status: closed => new

* resolution: fixed =>


Comment:

Ooops. I should have updated the commit message on
875e3ff4fd883e11008ca9dfcf02b8314c57c0a6 to be `Refs`.
[https://github.com/django/django/pull/12152 PR12152] is still incoming.

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:9>

Django

unread,
Nov 28, 2019, 9:42:16 AM11/28/19
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-------------------------------------+-------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:10>

Django

unread,
Nov 29, 2019, 8:04:34 AM11/29/19
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-------------------------------------+-------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"c33eb6dcd0c211f8f02b2976fe3b3463f0a54498" c33eb6d]:
{{{
#!CommitTicketReference repository=""
revision="c33eb6dcd0c211f8f02b2976fe3b3463f0a54498"
Fixed #29892 -- Added explicit Selenium wait in admin autocomplete tests.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:11>

Django

unread,
Dec 2, 2019, 2:56:40 PM12/2/19
to django-...@googlegroups.com
#29892: Multiple Selenium test failures in Firefox
-------------------------------------+-------------------------------------

Reporter: Tom Forbes | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"65285d1e7dc72f10ba69ab53b6fe5eb6b9ce3123" 65285d1e]:
{{{
#!CommitTicketReference repository=""
revision="65285d1e7dc72f10ba69ab53b6fe5eb6b9ce3123"
Refs #29892 -- Made Selenium tests wait for popups to be ready.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29892#comment:12>

Reply all
Reply to author
Forward
0 new messages