java -jar selenium-server-standalone-3.141.59.jar -role hub
4.启动node:(可以启用多个node)
java -jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://127.0.0.1:4444/grid/register-Dwebdriver.chrome.driver="C:\driver\chromedriver.exe" -port 6666 -maxSession 5 -browser browserName="chrome",maxInstances=5
后者
java -jar selenium-server-standalone-3.5.0.jar -role node -port 5555 -hub http://localhost:4444/grid/register
6.运行程序
完毕
原文:https://www.cnblogs.com/bubutianshu/p/11190276.html