Does anyone have an example code using Marionette in Java for testing automation? [closed]

0

I need a code sample using marionette with Java for testing automation, I read a few things, but I still can not understand how it works.

    
asked by anonymous 11.08.2016 / 16:18

1 answer

1

I have no knowledge about Marionette, however it is out of use according to the link link

The link itself states that it is preferable to use FirefoxDriver with marionette = true (or false )

The following commands are (read the property with System.getProperty() and set using System.setProperty() in Java code or by command line using the -DpropertyName=value flag) used by FirefoxDriver:

------------------------------------------------------------------------------------------
| Propriedade                  | O que faz                                               |
------------------------------------------------------------------------------------------
| webdriver.firefox.bin        | A localização do binário/programa usado pra controlar   |
|                              | o Firefox                                               |
------------------------------------------------------------------------------------------
| webdriver.firefox.marionette | Valor deve ser Boolean, se true o standalone-server irá |
|                              | ignorar qualquer requisição a uma habilidade do         |
|                              | "marionette" desejadae irá forçar o firefox a usar o    |
|                              | GeckoDriver, se false usará Legacy Firefox Driver       |
------------------------------------------------------------------------------------------
|webdriver.firefox.profile     | O nome do "perfil" usado quando o firefox inicia. Por   |
|                              |  padrão ele cria um "perfil" anonimo                    |
------------------------------------------------------------------------------------------
| webdriver.log.file           | Log de arquivo que recebe o log do javascript (console) |
------------------------------------------------------------------------------------------
| webdriver.firefox.logfile    | Log de arquivo que recebe o stdout/stderr do Firefox    |
------------------------------------------------------------------------------------------

In the wiki he cited an example with Firebug: link

First download firepug xpi using a Mozilla-based browser (like Firefox) and started 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);

DesiredCapabilities

The link link cites an example with DesiredCapabilities :

DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
WebDriver driver = new FirefoxDriver(capabilities);
    
11.08.2016 / 16:56