我正在从 bat 文件触发 Grid 并尝试启动我的远程 webdriver 但不知道如何通过 webdrivermanager 浏览器
我的蝙蝠代码
'''
set file=%~dp0\selenium-server-standalone.jar
set chromeDriver=%~dp0\chromedriver.exe
set ie32Driver=%~dp0\IEDriverServer32.exe
set ie64Driver=%~dp0\IEDriverServer64.exe
set geko32Driver=%~dp0\geckodriver_32.exe
set geko64Driver=%~dp0\geckodriver_64.exe
set edgeDriver=%~dp0\MicrosoftWebDriver.exe
set ie_auto_saver=%~dp0\ie_download_auto_saver\IEDownloadAutoSaver.exe
rem start ie auto saver
start %ie_auto_saver%
start java -jar %file% -port 4000 -role hub
for /l %%i in (1 1 %num%) do (
call:mystart %%i %port_start%
)
exit /b
:mystart
set /a port=%1+%2
start java -Xmx1024m -Dwebdriver.edge.driver=%edgeDriver% -Dwebdriver.gecko.driver=%geko64Driver% -Dwebdriver.ie.driver=%ie64Driver% -Dwebdriver.chrome.driver=%chromeDriver% -jar %file% -port %port% -role node -hub http://127.0.0.1:4000/grid/register
rem need to wait for 5 seconds or else multiple session of nodes are duplicated.
ping 127.0.0.1 -n 5
'''
并调用我的远程 webdriver
`new RemoteWebDriver(new URL(nodeURL),makeDesiredCapabilities(browser, remoteDownloadFolder, browserLanguage));`
不确定如何克服浏览器依赖性