AllNodes.bat的内容:
TITLE SELENIUM_NODE
set HUD_NAME=SZPC1888
set HUD_PORT=4444
set NODE_PORT=4005
set DRIVER_PATH_IE=C:WebDriverIEDriverServer.exe
set DRIVER_PATH_CHROME=C:WebDriverchromedriver.exe
set JAR_NAME=selenium-server-standalone-2.35.0.jar
set MAX_INSTANCES=1
set MAX_SESSION=1
java -jar %JAR_NAME% -Dwebdriver.chrome.driver=%DRIVER_PATH_CHROME% -Dwebdriver.ie.driver=%DRIVER_PATH_IE% -maxSession %MAX_SESSION% -role node -browser "browserName=internet explorer,maxInstances=%MAX_INSTANCES%,platform=WINDOWS" -browser "browserName=chrome,maxInstances=%MAX_INSTANCES%,chrome_binary=C:/Program Files (x86)/Google/Chrome/Application/chrome.exe,platform=WINDOWS" -browser "browserName=firefox,maxInstances=%MAX_INSTANCES%,platform=WINDOWS" -browser "browserName=safari,maxInstances=%MAX_INSTANCES%,platform=WINDOWS" -port %NODE_PORT% -hub http://%HUD_NAME%:%HUD_PORT%/grid/register
Hub.bat的内容:
TITLE SELENIUM_HUD
set SERVER_NAME=SZPC1888
set SERVER_PORT=4444
set JAR_NAME=selenium-server-standalone-2.35.0.jar
java -jar %JAR_NAME% -port %SERVER_PORT% -role hub -timeout 600 -browserTimeout 3600