0

I am trying to run a firefox node on ubuntu 12.04. I have 5 x sessions running. If I run the command firefox --display=:1 everything works and I can vnc on to the desktop and see firefox running. Next I have created a plugin for selenium grid2 where I set the capability moz.switches to --display=:1. When I run a test I can see on the node logs that the capability is present however it appears the switch is not getting sent to the firefox command:

11:46:38.603 INFO - Creating a new session for Capabilities [{platform=ANY, webdriver_assume_untrusted_issuer=false, noVNCPort=5901, browserName=firefox, moz.switches=[--display=:1], webdriver_accept_untrusted_certs=true, version=, x=1}]
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified

I got the moz.switches code from https://github.com/freynaud/grid-spine-selenium/blob/master/src/main/java/com/ebay/spine/LinuxWebDriverVNCProxy.java#L325 but it doesn't seem to be working. Does anyone have any experience writing this type of plugin? I'm a bit stuck really and looking at the selenium code can't see this moz.switches flag nor how I could debug the problem...

shmish111
  • 3,697
  • 5
  • 30
  • 52
  • the moz.switches value that you pass in the desired capabilities needs to be consumed by your code. You need to write the logic to read that value, determine the display value and send the test to that display. This is NOT part of selenium/webdriver grid. Francios did that externally for eBay. I went through the spine codebase, but couldn't find anything related to this. – A.J Sep 23 '13 at 03:32
  • Ok thanks, I'll ask François. I have no idea how the node starts the browser instances and how you hook in to that. – shmish111 Sep 24 '13 at 18:30

0 Answers0