python - How to set System Property "webdriver.gecko.driver" using Robot Framework? -
i'm using robot framework selenium2library automated frontend tests. ran tests in firefox browser. since version 47 of firefox built in firefoxdriver of selenium2library doesn't work anymore. searched through internet bit , found, have switch marionette aka. gecko driver.
while trying following error message:
suite setup failed: webdriverexception: message: path driver executable must set webdriver.gecko.driver system property; more information, see https://github.com/jgraham/wires. latest version can downloaded https://github.com/jgraham/wires
again tried find in internet way set path geckodriver
executable, found way java. neither python nor robot framework. have idea how set system property either in python or in robot framework
?
if not want use marionette, follow mukesh's answer , change versions. if want use marionette, simplest approach add wires (or geckodriver in future) system path suggested by mozilla developers.
the python bindings not support setting path geckodriver other parameter webdriver __init__. if modifying system path not option, way forward pass path executable selenium. robot framework, can create webdriver. __init__ firefox documented here.
*** settings *** library selenium2library library collections *** test cases *** specifying path geckodriver ${ff default caps} evaluate sys.modules['selenium.webdriver'].common.desired_capabilities.desiredcapabilities.firefox sys,selenium.webdriver set dictionary ${ff default caps} marionette=${true} create webdriver firefox executable_path=c:\\stuff\\wires.exe go https://stackoverflow.com sleep 2 s [teardown] close browsers
Comments
Post a Comment