我正在使用 Linux 设置我的 selenium-webdriver
测试,并致力于使用 Cron Jobs 自动化我的测试。运行我的脚本时,我收到此错误
Selenium::WebDriver::Error::WebDriverError:
unable to connect to chromedriver 127.0.0.1:9515
哪个 chromedriver
返回:
/usr/bin/chromedriver
和 which google-chrome-stable
返回:
/usr/bin/google-chrome-stable
我认为错误与尚未安装 Chrome 有关,所以我这样做了,但似乎没有解决我的问题。
我该如何解决这个问题?
谢谢!
最佳答案
首先,找到您的 chromedriver(可能是/usr/bin)并检查您的依赖项:
ldd /usr/bin/chromedriver
您可能至少会丢失 libgconf-2
如果是这种情况,请尝试解决:https://forums.aws.amazon.com/thread.jspa?threadID=229187
关于ruby - 无法连接到 chromedriver 127.0.0.1 :9515. Amazon Linux AMI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48176354/