shishirjaiswal shishirjaiswal - 6 months ago 564
Python Question

How to install firefoxdriver webdriver for python3 selenium on ubuntu?

I installed python3-selenium apt package on Ubuntu 16.04. While installing, got a message:

Suggested packages:
chromedriver firefoxdriver
The following NEW packages will be installed:
python3-selenium


When I try to run test cases in python3-django, I get the following error:

FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/firefoxdriver/webdriver.xpi'


I did searching for packages name firefoxdriver in Ubuntu repositories but none exist.

Any help with installing the webdrivers appreciated.

Answer

I'm not sure how to install the Firefox webdriver after installing the python3-selenium package.

You could install using pip instead, ideally in a virtual environment.

If you have Firefox installed and you run pip install selenium in your virtual environment, you should be good to go.

Comments