-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
FirefoxDriver
Firefox driver is included in the selenium-server-stanalone.jar available in the downloads. The driver comes in the form of an xpi (firefox extension) which is added to the firefox profile when you start a new instance of FirefoxDriver.
- Runs in a real browser and supports Javascript
- Faster than the InternetExplorerDriver
- Slower than the HtmlUnitDriver
The following system properties (read using System.getProperty()
and set using System.setProperty()
in Java code or the "-DpropertyName=value
" command line flag) are used by the FirefoxDriver:
Property | What it means |
---|---|
webdriver.firefox.bin | The location of the binary used to control firefox. |
webdriver.firefox.marionette | Boolean value, if set on standalone-server will ignore any "marionette" desired capability requested and force firefox to use GeckoDriver (true) or Legacy Firefox Driver (false) |
webdriver.firefox.profile | The name of the profile to use when starting firefox. This defaults to webdriver creating an anonymous profile |
webdriver.firefox.useExisting | Never use in production Use a running instance of firefox if one is present |
webdriver.log.logfile | Log file to dump javascript console logging to |
webdriver.firefox.logfile | Log file to dump firefox stdout/stderr to |
Normally the Firefox binary is assumed to be in the default location for your particular operating system:
OS | Expected Location of Firefox |
---|---|
Linux | firefox (found using "which") |
Mac | /Applications/Firefox.app/Contents/MacOS/firefox-bin |
Windows | %PROGRAMFILES%\Mozilla Firefox\firefox.exe |
By default, the Firefox driver creates an anonymous profile
Download the firebug xpi file from mozilla and start the profile as follows:
File file = new File("firebug-1.8.1.xpi");
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.addExtension(file);
firefoxProfile.setPreference("extensions.firebug.currentVersion", "1.8.1"); // Avoid startup screen
WebDriver driver = new FirefoxDriver(firefoxProfile);
This wiki is not where you want to be! Visit the Wiki Home for more useful links
Getting Involved
Build Instructions
Releasing Selenium
Updating Chromium DevTools
Ruby Development
Python Bindings
Ruby Bindings
WebDriverJs
This content is being evaluated for where it belongs
Architectural Overview
Automation Atoms
HtmlUnitDriver
Lift Style API
LoadableComponent
Logging
PageFactory
RemoteWebDriver
Xpath In WebDriver
Moved to Official Documentation
Bot Style Tests
Buck
Continuous Integration
Crazy Fun Build
Design Patterns
Desired Capabilities
Developer Tips
Domain Driven Design
Firefox Driver
Firefox Driver Internals
Focus Stealing On Linux
Frequently Asked Questions
Google Summer Of Code
Grid Platforms
History
Internet Explorer Driver
InternetExplorerDriver Internals
Next Steps
PageObjects
RemoteWebDriverServer
Roadmap
Scaling WebDriver
SeIDE Release Notes
Selenium Emulation
Selenium Grid 4
Selenium Help
Shipping Selenium 3
The Team
TLC Meetings
Untrusted SSL Certificates
WebDriver For Mobile Browsers
Writing New Drivers