chromedriver-version: 79.0.3945.36
google-chrome version:79.0.3945.88
java version:openjdk version "1.8.0_232"
selenium-standalone-server version:3.141.59
首先将在后台启动无头的Google chrome:
google-chrome --headless --no-sandbox --no-cache --disable-gpu --disable-dev-shm-usage&
然后我启动chromedriver:
chromedriver --proxy-server = 10.0.xx:yyyy --headless --disable-gpu --nogui --no-sandbox --enable-logging --ignore-certificate-errors --start-maximized- disable-dev-shm-usage --no-cache
启动中心: java -jar selenium-server-standalone-3.141.59.jar -role hub
注册节点并使用以下命令对其进行配置:
java -Dwebdriver.chrome.driver = / usr / local / bin / chromedriver,browserName = chrome,version =“ 79.0.3945.88”,headless = true,chrome_binary = / usr / bin / google-chrome -jar / usr /local/bin/selenium-server-standalone-3.141.59.jar-角色节点-hub http://IP:4444/grid/register,browserName=chrome,version=“ 79.0.3945.88”,headless = true,chrome_binary = / usr / bin / google-chrome,webdriver.chrome .driver = / usr / local / bin / chromedriver
然后我运行命令以127.0.0.1作为主机,4444作为端口执行我的案件
下面是错误消息。
Step Failed: SeleniumError: Unable to create new service: ChromeDriverService Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: 'localhost.localdomain', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-957.27.2.el7.x86_64', java.version: '1.8.0_232' Driver info: driver.version: unknown
我要去哪里了,请提出建议..
答案 0 :(得分:0)
错误消息中说“ driver.version:未知”,因此我希望它们与chromedriver.exe路径或版本可比性有关。