Everything works fine with Firefox, but I can't start chrome. I'm on linux, using php webdriver bindings.
require_once "/usr/local/src/selenium/php-webdriver-bindings-0.9.0/phpwebdriver/WebDriver.php";
putenv("PATH=".getenv("PATH").':'.'/usr/local/src/selenium/chrome_webdriver/'); //Prepare for chrome
$webdriver = new WebDriver("localhost", "4444");
//$webdriver->connect("chrome");
$webdriver->connect("chrome","",array(
'webdriver.chrome.driver'=>'/usr/local/src/selenium/chrome_webdriver/chromedriver',
));
The error message I get is "The path to the chromedriver executable must be set by the webdriver.chrome.driver system property". As you can see, I've tried setting that in the desiredCapabilities array, but that must be the wrong place. I can see in the selenium logs that my setting is getting through as this log line shows:
INFO - Executing: [new session: {javascriptEnabled=true, webdriver.chrome.driver=/usr/local/src/selenium/chrom..., browserName=chrome, nativeEvents=false, version=}] at URL: /session)
I start selenium with java -jar selenium-server-standalone-2.21.0.jar
I'm using Chromium v.18.
I created a shortcut /usr/bin/google-chrome that points to /usr/bin/chromium-browser
I can start chromedriver manually with no problems. It says:
port=9515
version=20.0.1133.0
Having that running, or not, does not make any difference to the error message selenium gives me.
UPDATE: Related question: selenium 2 chrome driver (answer there is for java, not php)