1
I need an example of code using Java Marionette for test automation, I read a few things, but I still can’t understand how it works.
1
I need an example of code using Java Marionette for test automation, I read a few things, but I still can’t understand how it works.
2
I have no knowledge of Marionette, yet he is in disuse according to the link https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/firefox/MarionetteDriver.html
The link itself cites that it is preferred to use Firefoxdriver with marionette = true
(or false
)
The following commands are (read property with System.getProperty()
and define using System.setProperty()
in Java code or by command line using the flag -DpropertyName=value
) used by Firefoxdriver:
Estate | What does |
---|---|
webdriver.firefox.bin |
The binary/program location used to control Firefox |
webdriver.firefox.marionette |
Value must be Boolean, if true the standalone-server will ignore any request to a desired "Marionette" skill and will force firefox to use Geckodriver, if false will use Legacy Firefox Driver |
webdriver.firefox.profile |
The name of the "profile" used when firefox starts. By default it creates an anonymous "profile" |
webdriver.log.file |
File log that receives the javascript log (console) |
webdriver.firefox.logfile |
File log that receives stdout/stderr from Firefox |
In the wiki they cite an example with Firebug: https://github.com/SeleniumHQ/selenium/wiki/FirefoxDriver
First download firebug xpi using a Mozilla-based browser (like Firefox) and launch it
File file = new File("firebug-1.8.1.xpi");
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.addExtension(file);
//previne exibir a tela de inicio
firefoxProfile.setPreference("extensions.firebug.currentVersion", "1.8.1");
WebDriver driver = new FirefoxDriver(firefoxProfile);
On the link https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver cites an example with DesiredCapabilities
:
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
WebDriver driver = new FirefoxDriver(capabilities);
Thank you William :D
Browser other questions tagged testing automation selenium-webdriver
You are not signed in. Login or sign up in order to post.
I did not understand what Marionette was referring to, it would be https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/firefox/MarionetteDriver.html (https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver) ?
– Guilherme Nascimento