Selenium Firefox



Selenium is a web automation framework that can be used to automate website testing. Because Selenium starts a webbrowser, it can do any task you would normally do on the web.

If you are new to selenium and browser automation, I recommend the course below.

Learn Selenium in 1 Day: Definitive Guide to Learn Selenium for Beginners (2017) by Krishna Rungta: Selenium: Front End Testing and Continuous Integration (2017) by Daniel Ellis: Selenium WebDriver: From Foundations To Framework (2016) by Yujun Liang, Alex Collins: Selenium Webdriver: Software Automation Testing Secrets Revealed Part 2 (2016) by Narayanan Palani.

Selenium Firefox

Related course
Browser Automation with Python Selenium

  1. Selenium IDE is a Chrome and Firefox plugin which records and plays back user interactions with the browser. Use this to either create simple scripts or assist in exploratory testing. Download latest released version for Chrome or for Firefox or view the Release Notes. Download previous IDE versions here.
  2. Download selenium-firefox-driver-2.4.0.jar. Selenium-firefox/selenium-firefox-driver-2.4.0.jar.zip( 1,123 k) The download jar file contains the following class files.

Web Driver

To start a web browser, the Selenium module needs a web driver. Python interacts with the selenium web driver and the web driver interacts with the browser.

Selenium Firefox Ide

Supported browsers are:

Selenium Firefox Path

  • Chrome
  • Firefox
  • Internet Explorer
  • Safari
  • Opera
  • PhantomJS (invisible)

To start a browser, you will need to corresponding web driver. The driver “ChromeDriver” is needed to start Chrome, “FirefoxDriver” for Firefox.
All drivers can be downloaded from: https://docs.seleniumhq.org/download/

Firefox

Example code
Python will start and control the chromium browser using the code below:

You can change the browser by creating a different instance:

The first two lines in the above code will open the browser on the same computer, the others lines open the browser remotely: on a phone.

Then open a webpage using the get() method: