I am setting up my selenium-webdriver
tests with Linux and working on automating my tests with Cron Jobs. When running my script I am receiving this error
我正在使用Linux设置我的selenium-webdriver测试,并致力于使用Cron Jobs自动化我的测试。运行我的脚本时,我收到此错误
Selenium::WebDriver::Error::WebDriverError:
unable to connect to chromedriver 127.0.0.1:9515
which chromedriver
returns:
哪个chromedriver返回:
/usr/bin/chromedriver
在/ usr / bin中/ chromedriver
and which google-chrome-stable
returns:
以及google-chrome-stable的回报:
/usr/bin/google-chrome-stable
在/ usr / bin中/谷歌铬稳定
I thought that the error was related to not having Chrome installed yet, so I did that, but has not seemed to fix my issue.
我认为错误与尚未安装Chrome有关,所以我这样做了,但似乎没有解决我的问题。
How can I work through this?
我该如何解决这个问题?
Thanks!
谢谢!
1 个解决方案
#1
2
Firstly, locate your chromedriver (possibly /usr/bin) and check your dependencies:
首先,找到你的chromedriver(可能是/ usr / bin)并检查你的依赖项:
ldd /usr/bin/chromedriver
It is likely you'll be missing at least libgconf-2
很可能你至少会缺少libgconf-2
If this is the case, try this to resolve: https://forums.aws.amazon.com/thread.jspa?threadID=229187
如果是这种情况,请尝试以此解决:https://forums.aws.amazon.com/thread.jspa?threadID = 229187
#1
2
Firstly, locate your chromedriver (possibly /usr/bin) and check your dependencies:
首先,找到你的chromedriver(可能是/ usr / bin)并检查你的依赖项:
ldd /usr/bin/chromedriver
It is likely you'll be missing at least libgconf-2
很可能你至少会缺少libgconf-2
If this is the case, try this to resolve: https://forums.aws.amazon.com/thread.jspa?threadID=229187
如果是这种情况,请尝试以此解决:https://forums.aws.amazon.com/thread.jspa?threadID = 229187