Reputation: 31
I'm new to Robot Framework, I have tried setting the path to the Firefox binary through Robot Framework without success. My goal is to parse the following python code:
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary('c:\path\to\binary')
driver = webdriver.Firefox(firefox_binary=binary)
with robot framework:
${firefox_path}= Evaluate sys.modules['selenium.webdriver'].firefox.firefox_binary.FirefoxBinary(firefox_path="C:\\Users\\xxx\\ff\\firefox.exe", log_file=None) sys
Create WebDriver Firefox firefox_binary=${firefox_path}
Go to www.google.fr
However when I run the above I get the following error message:
WebDriverException: Message: Expected browser binary location, but unable to
find binary in default location, no 'moz:firefoxOptions.binary' capability
provided, and no binary flag set on the command line
Does anyone have any idea on how to fix my problem? Any help would be greatly appreciated, two days of trying to get Firefox to work.
Thanks, Nelly
Upvotes: 2
Views: 4005
Reputation: 31
I share with you one solution :
If you want to test Firefox Extended Support Release or portable Firefox, you just have to set the marionette to false
${firefox_path}= | Evaluate | sys.modules['selenium.webdriver'].firefox.firefox_binary.FirefoxBinary(firefox_path='C:\\Users\\xxx\\FirefoxPortable37\\FirefoxPortable.exe', log_file=None) | sys
${caps}= | Evaluate | sys.modules['selenium.webdriver'].common.desired_capabilities.DesiredCapabilities.FIREFOX | sys
Set To Dictionary | ${caps} | marionette=${False}
Create WebDriver | Firefox | firefox_binary=${firefox_path} | capabilities=${caps}
Go To | http://free.fr
Upvotes: 1