[Django] #33455: Potentially missleading error message when running selenium tests

8 views
Skip to first unread message

Django

unread,
Jan 20, 2022, 12:14:56 PM1/20/22
to django-...@googlegroups.com
#33455: Potentially missleading error message when running selenium tests
-----------------------------------------+------------------------
Reporter: David Smith | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 4.0
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 |
-----------------------------------------+------------------------
I got tripped up by the error message generated by this line

https://github.com/django/django/blob/2c76c27a951ee76c6f763a05c7e119305a21c78d/tests/runtests.py#L329

The issue was that I didn't have selenium installed. However, the error
message I received was


{{{
runtests.py: error: argument --selenium: Selenium browser specification
'chrome' is not valid.

}}}

Therefore much head scratching trying to think about what was wrong with
chrome/webdriver rather than not having selenium installed. Maybe there is
something better we could do here?

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

Django

unread,
Jan 20, 2022, 2:15:12 PM1/20/22
to django-...@googlegroups.com
#33455: Missleading error message when running selenium tests without selenium.
--------------------------------------+------------------------------------

Reporter: David Smith | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* type: Uncategorized => Cleanup/optimization
* component: Uncategorized => Testing framework
* stage: Unreviewed => Accepted


Comment:

We could try to import `selenium` before calling `import_webdriver()`.

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

Django

unread,
Jan 20, 2022, 2:33:30 PM1/20/22
to django-...@googlegroups.com
#33455: Missleading error message when running selenium tests without selenium.
-------------------------------------+-------------------------------------
Reporter: David Smith | Owner: Mohamed
Type: | Nabil Rady
Cleanup/optimization | Status: assigned

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

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mohamed Nabil Rady):

* owner: nobody => Mohamed Nabil Rady
* status: new => assigned
* has_patch: 0 => 1
* easy: 0 => 1


Comment:

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

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

Django

unread,
Jan 22, 2022, 6:54:09 AM1/22/22
to django-...@googlegroups.com
#33455: Missleading error message when running selenium tests without selenium.
-------------------------------------+-------------------------------------
Reporter: David Smith | Owner: Mohamed
Type: | Nabil Rady
Cleanup/optimization | Status: closed

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

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"9dc65263d47a5b8857492c10ce151bab83cfe672" 9dc6526]:
{{{
#!CommitTicketReference repository=""
revision="9dc65263d47a5b8857492c10ce151bab83cfe672"
Fixed #33455 -- Improved error message when selenium is not installed.
}}}

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

Reply all
Reply to author
Forward
0 new messages