Skip to content

Instantly share code, notes, and snippets.

@stormoz
Last active February 10, 2022 08:57
Show Gist options
  • Save stormoz/355e582e63c39ec897a1 to your computer and use it in GitHub Desktop.
Save stormoz/355e582e63c39ec897a1 to your computer and use it in GitHub Desktop.
Start Selenium Grid hub and nodes as Windows services
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
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
nssm stop SeleniumNode1
nssm remove SeleniumNode1 confirm
nssm stop SeleniumNode2
nssm remove SeleniumNode2 confirm
nssm stop SeleniumHub
nssm remove SeleniumHub confirm
@kishoricoep
Copy link

Will it work on Windows server 2012?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment