How to set up ConEmu task for Selenium Grid
Question
I searched for this for some days now and haven't found a good resource.
I want to set up two tasks for the Selenium Grid to work "with just one click" in ConEmu. I added a task and set up a startup dir (where the Selenium Grid jar is located).
According to http://code.google.com/p/selenium/wiki/Grid2 I need to start two instances of that jar with different parameters:
java -jar selenium-server-standalone-2.14.0.jar -role hub
and
java -jar selenium-server-standalone-2.14.0.jar -role node -hub http://localhost:4444/grid/register
I wanted to have two tasks in ConEmu to start those two instances of Selenium. I tried to set up a task with
-new_console:d:D:\Downloads\Programming\Selenium
java -jar selenium-server-standalone-2.14.0.jar -role hub
This always leads me to following output in ConEmu
Error: Unable to access jarfile selenium-server-standalone-2.14.0.jar
Current directory:
C:\Program Files\ConEmu\ConEmu
Command to be executed:
"C:\Windows\system32\java.exe" -jar selenium-server-standalone-2.14.0.jar -role hub
ConEmuC: Root process was alive less than 10 sec, ExitCode=1.
Press Enter or Esc to close console...
With the jar in the task it won't open the source path. When deleting the jar with parameters in the task, a new console opens and navigates to the correct folder.
I am totally lost here - how do I have to set up a task to run the Selenium grid automatically?
Edit 1: I added a screenshot from the current setup (-> http://tinyurl.com/q2mgkmx [as I do not have enough reputation, I altered the stackoverflow url with tinyurl; nothing to fear here ;) ]). I know this is wrong, as every entry in a new line opens a new tab in ConEmu. But I thought that the ">" parameter would mark the tab as "current tab" ...
Edit 2: Just for completeness: I do run the 64bit client on Windows 7.
Solution 2
I found a solution! yay
Screenshot of working hub and node: http://tinyurl.com/njkszq6 (Stackoverflow image)
I don't know if this might work better if set up in another way, but this should be fine for now. This is the setup I twiddled together from various sources:
>cmd /k color 4C & cd /d "D:\Downloads\Programming\Selenium" -cur_console:t:Hub & java -jar selenium-server-standalone-2.40.0.jar -role hub
>cmd /k RenameTab "Node" & color 2A & cd /d "D:\Downloads\Programming\Selenium" -cur_console:s1TVn & java -jar selenium-server-standalone-2.40.0.jar -role node
Screenshot of ConEmu setup: http://tinyurl.com/pnfyta5 (Stackoverflow image)
This opens both console windows on top and bottom of ConEmu. I added color to both windows. And they both start the respective hub and node of Selenium.
I still don't know why Maximus' line of code did not do the magic trick. But it was a really good hint on where to head to.
@Maximus: If you can shed some light into this, I would appreciate it greatly!
Edit: I added Maximus' hints to the setup.
OTHER TIPS
java -jar selenium-server-standalone-2.14.0.jar -role hub -new_console:d:D:\Downloads\Programming\Selenium