I'm setting up a selenium grid and encounter an error when trying to run tests with chrome and chrome driver while using a selenium HUB / NODE setup.
An error occurs when running the tests against a selenium grid. The error occurs when the chrome driver expects the proxy config item in the capabilities to be omitted.
The chrome config is as follows:
default:
paths:
features: 'features'
bootstrap: 'features/bootstrap'
context:
parameters:
javascript_session: selenium
browser: chrome
show_cmd: open %s
extensions:
Behat\MinkExtension\Extension:
base_url: 'http://example.co.uk/'
default_session: selenium2
browser_name: chrome
selenium2:
capabilities:
browserName: chrome
browser: chrome
browserVersion: 21
version: "21"
chrome:
switches:
- "--start-maximized"
- "--disable-translate"
As you can see no proxy is specified.
When placing the debugger at the following line:
https://github.com/Behat/MinkExtension/blob/master/src/Behat/MinkExtension/Extension.php#L36
The config variable has a value present within the capabilities array for 'proxy'. It's an empty array.
When attempting to run the test suite the following error occurs on the selenium node :
proxy must be of type dictionary, not list. Received:
Command duration or timeout: 1.02 seconds
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 21:08:56'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_31'
Driver info: driver.version: ChromeDriver
When I comment out the following lines:
https://github.com/Behat/MinkExtension/blob/master/src/Behat/MinkExtension/Extension.php#L247-248
The config array above has no value for proxy in it.
No error occurs on the selenium node.
When I use firefox using the following config no error occurs:
default:
paths:
features: 'features'
bootstrap: 'features/bootstrap'
context:
parameters:
javascript_session: selenium
browser: chrome
show_cmd: open %s
extensions:
Behat\MinkExtension\Extension:
base_url: 'http://example.co.uk/'
default_session: selenium2
browser_name: firefox
selenium2:
capabilities:
browserName: firefox
browser: firefox
browserVersion: 15
version: "15"
Notes
As this is a chrome only problem I'm assuming that the issue is with the ChromeDriver. A similar issue was encountered in the selenium remote driver bindings for perl.
teodesian/Selenium-Remote-Driver#36
Environment
Selenium Hub: OSX 10.7
Command used to start hub:
selenium-server-standalone-2.25.0.jar -role hub
Selenium Node: Windows 7 Ultimate (vm)
Command used to start node:
java -jar selenium-server-standalone-2.25.0.jar
-Dwebdriver.chrome.driver="C:\Users\Administrator\Downloads\chromedriver_win_23
.0.1240.0\chromedriver.exe" -role node -hub http://192.168.56.1:4444/grid/regist
er -host 192.168.56.101 -browser browserName=firefox,version=15,maxInstances=1 -
browser browserName=chrome,version=21,maxInstances=1