Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 813
shishirjaiswal Avatar asked May 10 '16 20:05

shishirjaiswal


People also ask

Does Selenium support python3?

Selenium is an open source automation testing tool that supports a number of scripting languages like Python, C#, Java, Perl, Ruby, JavaScript, etc.

What is FirefoxDriver in Selenium?

Selenium Firefox Driver, also called GeckoDriver is a browser engine developed by Mozilla for many applications. It provides a link between test cases and the Firefox browser. Without the help of GeckoDriver, one cannot instantiate the object of Firefox browser and perform automated Selenium testing.


1 Answers

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.

like image 168
Alasdair Avatar answered Sep 28 '22 18:09

Alasdair