SELENIUM_3 - Yash-777/SeleniumDriverAutomation GitHub Wiki
SELENIUM - 3:
Mozilla Firefox Browser: (https://www.mozilla.org/en-US/firefox/organizations/all/)
In SELENIUM-3 FirefoxDriver defaults to use the Marionette GeckoDriver. GeckoDriver is to communicate with Gecko browsers, such as Firefox. It translates calls into the Marionette automation protocol by acting as a proxy between the local- and remote ends. Support is best in Firefox 48 and onwards, and want to make it clear that Firefox 47 and earlier is explicitly not supported. If you don't want to worry about Marionette, the other option is to downgrade to Firefox 45. So, that selenium uses inbuilt driver to communicate with Firefox browser.
Firefox 47.1 is compatible with Selenium 2.53.1 allowing us to use the FirefoxDriver again.
What if you want to use the built in FirefoxDriver, as if you use Selenium 3 and firfox 45 you can.
Example..,
- set the Firefox driver capability “marionette” to false
- set the firefox_binary capability to the path of your legacy firefox
Marionette « WebDriver (https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver)
Note that you should be using Selenium 3.0 or later, which enables support for Marionette by default.
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", false);
String binaryPath = "../Mozilla Firefox/firefox.exe";
capabilities.setCapability("firefox_binary", binaryPath);
String driverEXEPath = "../webdriver.xpi";
System.setProperty(FirefoxDriver.SystemProperty.DRIVER_XPI_PROPERTY, driverEXEPath);
WebDriver driver = new FirefoxDriver(capabilities);
To use Marionette Driver:
System.setProperty(“webdriver.gecko.driver”, “C:\\geckodriver.exe”);
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(“marionette”, true);
WebDriver driver = new FirefoxDriver(capabilities);
(OR)
WebDriver driver = new MarionetteDriver();