|
FirefoxDriver
Information about the Firefox Driver
Firefox DriverEverything you ever wanted to know about the Firefox driver but were afraid to ask. See below for instructions on how to install the FirefoxDriver. Before Going Any FurtherThe FirefoxDriver contains everything it needs in the JAR file. If you're just interested in using this driver, then all you need to do is put the webdriver-firefox.jar on your CLASSPATH, and WebDriver will do everything else for you. If you want to dig deeper, though, carry on reading! Important System PropertiesThe 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:
Normally the Firefox binary is assumed to be in the default location for your particular operating system:
The default profile name is WebDriver (the casing matters!) Installing a Downloaded BinaryThe "wedriver-firefox.zip" which may be downloaded from the website, contains all the dependencies (including the common library) required to run the FirefoxDriver. In order to use it:
Installing the Quick Way From Source (with Ruby)If you're doing development work, the test suites are arranged in such a way as to use the version of webdriver found in firefox/src/extension This assumes that your installation of Firefox 2 or 3 is pretty standard. On Windows, this means that it should be installed in the default location ("C:\Program Files\Mozilla Firefox") and on the Mac under "/Applications/Firefox". On Linux, it is assumed that firefox is available on the default PATH. If your firefox is installed in a custom location, then open up the SingleTestSuite and add a system property to tell the firefox driver where your Firefox binary is: System.setProperty("webdriver.firefox.bin", "d:\\apps\\mozilla firefox\\firefox"); Pros
Cons
|
Sign in to add a comment
I just installed Firefox v3.0.5 and then installed Firefox WebDriver? in the default Firefox profile. It doesn't seem to work properly when SSL is involved.
When Webdriver opens a secure URL, the "Secure Connection Failed" error page is displayed. If I paste manually the same URL in the browser address bar it works fine. My test fails with "org.openqa.selenium.NoSuchElementException?: Unable to locate element using //a[@href=...".
Maybe someone can answer.
Thanks, Mircea
For technical help and advice, please go to the project home page and click on the "General support and discussion" link.
@mircea: It sounds like you're attempting to connect to a page that doesn't have a valid SSL certificate. This is covered by issue #116. Please "star" that issue to follow it!
Thanks, Simon. That's exactly what happened. I tested in a local/intranet QA environment where we use self signed certificates. I've read the issue you mentioned and starred it.
I didn't know how to set a system property. By reading Webdriver issues I found that other people had that "small" problem. I suggest to add a few line to this very page to document that. Below are two alternatives to set same property: System.getProperties().put("webdriver.firefox.useExisting", "true"); System.setProperty("webdriver.firefox.useExisting", "true");
Hi Everyone! I want to know if there is any way to remove the language configuration from the driver because I'm testing i18n in a webapp and I really need no language in the Tools>Options>Content>Select a language to add. How can I do this? Thanks in advance!!
The best place to ask for help is the Google Group: https://groups.google.com/group/webdriver