Last active
April 12, 2018 17:59
-
-
Save revington/5858300 to your computer and use it in GitHub Desktop.
launch selenium grid + phantomjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
trap 'killall' INT | |
killall() { | |
trap '' INT TERM # ignore INT and TERM while shutting down | |
echo "**** Shutting down... ****" # added double quotes | |
kill -TERM 0 # fixed order, send TERM not INT | |
wait | |
echo DONE | |
} | |
hub="java -jar selenium-server-standalone-2.37.0.jar -role hub" | |
node="java -jar selenium-server-standalone-2.37.0.jar -role node -hub http://localhost:4444/grid/register" | |
phantom="phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://127.0.0.1:4444" | |
chrome="java -Dwebdriver.chrome.driver=./chromedriver -jar selenium-server-standalone-2.37.0.jar -role webdriver -hub http://localhost:4444/grid/register -port 5556 -browser browserName=chrome,maxInstances=10" | |
opera="java -Dwebdriver.opera.driver=./operadriver-v1.1/operadriver-v1.1.jar -jar selenium-server-standalone-2.37.0.jar -role webdriver -hub http://localhost:4444/grid/register -port 5557 -browser browserName=opera" | |
${hub} & | |
echo '3' | |
sleep 1 | |
echo '2' | |
sleep 1 | |
echo '1' | |
sleep 1 | |
echo 'registering drivers' | |
${node} & | |
${phantom} & | |
${chrome} & | |
${opera} & | |
cat #wait forever… |
+1
Any news on this?
$ phantomjs --webdriver=5555 --webdriver-selenium-grid-hub=http://localhost:4444/
[INFO - 2018-04-12T17:56:12.038Z] GhostDriver - Main - running on port 5555
[INFO - 2018-04-12T17:56:12.039Z] GhostDriver - Main - registering to Selenium HUB 'http://localhost:4444/' version: using '127.0.0.1:5555' with org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy.
[ERROR - 2018-04-12T17:56:12.043Z] GhostDriver - main.fail - {"line":97,"sourceURL":"phantomjs://platform/hub_register.js","stack":"register@phantomjs://platform/hub_register.js:97:79\nglobal code@phantomjs://code/main.js:78:37"}
phantomjs://platform/console++.js:263 in error
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have the same issue.
[INFO - 2017-10-21T11:39:22.232Z] GhostDriver - Main - running on port 8080
[INFO - 2017-10-21T11:39:22.238Z] GhostDriver - Main - registering to Selenium HUB 'http://127.0.0.1:4444' version: using '127.0.0.1:8080' with org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy.
[ERROR - 2017-10-21T11:39:22.256Z] GhostDriver - main.fail - {"line":97,"sourceURL":"phantomjs://platform/hub_register.js","stack":"register@phantomjs://platform/hub_register.js:97:79\nglobal code@phantomjs://code/main.js:78:37"}
phantomjs://platform/console++.js:263 in error
Does anyone working on this issue?