How to use Marionette web driver in robotframework after browser upgrade to Firefox 47

I used robotframework Selenium2Library to run the test in Firefox. When I upgrade Firefox to version 47, I find that Firefox will crash at the beginning when Firefox starts. The problem is the github problem list, as shown below: https://github.com/SeleniumHQ/selenium/issues/2110 .

So, I turned to using Marionette as release notes, but the result is not very good (error shows: WebDriverException: Message: connection refused, and using selenium will not help directly). In addition, the selenium2Library manual page indicates that the desired qualities will not work for the local webdriver.

So my questions are:

  • How to configure a local instance of webdriver Marionette in Selenium and move on to the robot for further testing operations?
  • If there is a way to save Firefox 47 without webdriver support?

I followed the instructions here: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver

in python file:

def returnFirefoxCapabilities(marionetteBinaryPath):
    firefox_capabilities = DesiredCapabilities.FIREFOX
    firefox_capabilities['marionette'] = True
    firefox_capabilities['binary'] = marionetteBinaryPath
    return firefox_capabilities

and in the robot file:

*** Settings ***
Library           Selenium2Library  #build-in library
*** Test Case ***
try marionette
   ${firefox_capabilities}=     returnFirefoxCapabilities    path/wires
   open browser  url=www.google.com    desired_capabilities=${firefox_capabilities}
+4
source share
1 answer

Selenium2Library -. Firefox, webdriver , (Python). Firefox 47, Selenium 2.53.5 Geckodriver 0.8.0.

${ff default caps}    Evaluate    sys.modules['selenium.webdriver'].common.desired_capabilities.DesiredCapabilities.FIREFOX    sys,selenium.webdriver
Set To Dictionary    ${ff default caps}    marionette=${True}
Open Browser    https://www.stackoverflow.com    ff

, webdriver. X-Y, . , .

+2

All Articles