I want to use robotframework with Google Chrome. Somehow the chromedriver does not find the Google Chrome binary:
WebDriverException: Message: unknown error: cannot find Chrome binary
When I try to run my test with firefox, it works fine. I have search the net for some solutions, but I find only articles specifing the path to chromedriver, but not to the Google Chrome binary.
Heres what I have installed.
pybot --version
Robot Framework 3.0.4 (Python 3.5.4 on darwin)
Code to execute with pybot: google.robot
*** Settings ***
Documentation Hello World for robotframwork with headless chrome
Library SeleniumLibrary
#Library OperatingSystem
#Suite Setup Setup chromedriver
### https://stackoverflow.com/questions/28537290/how-to-set-path-chrome-driver-in-robot-framework
#*** Keywords ****
#Setup chromedriver
#Set Environment Variable webdriver.chrome.driver /usr/local/bin/chromedriver
#Set Environment Variable webdriver.chrome.binary /Applications/Chrome.app/Contents/MacOS/Google\ Chrome
*** Test Cases ***
User shall call google and make a screenshot
[Documentation] First test
[Tags] Headless
#Open Browser https://google.com ff
Open Browser https://google.com gc
#Open Browser https://google.com headlesschrome
Capture Page Screenshot
Close All Browsers
When I run this code I get the following:
pybot google.robot
==============================================================================
Google :: Hello World for robotframwork with headless chrome
==============================================================================
User shall call google and make a screenshot :: First test | FAIL |
WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052),platform=Mac OS X 10.11.6 x86_64)
------------------------------------------------------------------------------
Google :: Hello World for robotframwork with headless chrome | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output: /Users/foo/workspace/robotframework/output.xml
Log: /Users/foo/workspace/robotframework/log.html
Report: /Users/foo/workspace/robotframework/report.html