Last active
February 10, 2022 08:57
-
-
Save stormoz/355e582e63c39ec897a1 to your computer and use it in GitHub Desktop.
Start Selenium Grid hub and nodes as Windows services
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
Install latest Java: https://www.java.com/en/download/manual.jsp | |
Download latest Selenium Grid server: "selenium-server-standalone-*.jar": http://selenium-release.storage.googleapis.com/index.html | |
Install Chrome for all users: https://www.google.com/chrome/browser/desktop | |
Download latest Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/downloads | |
Download nssm: https://nssm.cc/download |
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
nssm install SeleniumHub java -jar C:\Selenium\selenium-server-standalone-2.48.2.jar -role hub | |
nssm start SeleniumHub | |
nssm install SeleniumNode1 java -jar C:\Selenium\selenium-server-standalone-2.48.2.jar -role node -hub http://localhost:4444/grid/register -Dwebdriver.chrome.driver=C:\Selenium\chromedriver.exe | |
nssm set SeleniumNode1 DependOnService SeleniumHub | |
nssm start SeleniumNode1 | |
nssm install SeleniumNode2 java -jar C:\Selenium\selenium-server-standalone-2.48.2.jar -role node -hub http://localhost:4444/grid/register -Dwebdriver.chrome.driver=C:\Selenium\chromedriver.exe | |
nssm set SeleniumNode2 DependOnService SeleniumHub | |
nssm start SeleniumNode2 |
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
nssm stop SeleniumNode1 | |
nssm remove SeleniumNode1 confirm | |
nssm stop SeleniumNode2 | |
nssm remove SeleniumNode2 confirm | |
nssm stop SeleniumHub | |
nssm remove SeleniumHub confirm | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Will it work on Windows server 2012?