Opened 3 years ago

Closed 3 years ago

#33455 closed Cleanup/optimization (fixed)

Missleading error message when running selenium tests without selenium.

Reported by: David Smith Owned by: Mohamed Nabil Rady
Component: Testing framework Version: 4.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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?

Change History (3)

comment:1 by Mariusz Felisiak, 3 years ago

Component: UncategorizedTesting framework
Summary: Potentially missleading error message when running selenium testsMissleading error message when running selenium tests without selenium.
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

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

comment:2 by Mohamed Nabil Rady, 3 years ago

Easy pickings: set
Has patch: set
Owner: changed from nobody to Mohamed Nabil Rady
Status: newassigned

comment:3 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 9dc6526:

Fixed #33455 -- Improved error message when selenium is not installed.

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