|
FirefoxDriver
Information about the Firefox Driver
WebDriver Firefox DriverFirefox 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. Pros
Cons
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:
By default, the Firefox driver creates an anonymous profile Running with firebugDownload 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);-Beta- load fast preferenceThere is beta feature to make firefox not wait for the full page to load after calling .get or .click. This may cause immediate find's to break, so please be sure to use an implicit or explicit wait too. This is only available for Firefox and not other browsers. FirefoxProfile fp = new FirefoxProfile();
fp.setPreference("webdriver.load.strategy", "unstable"); // As of 2.19. from 2.9 - 2.18 use 'fast'
WebDriver driver = new FirefoxDriver(fp);
| ||||||||||||||||||||||||||||||||