无法连接到chromedriver http://127.0.0.1:50299(Selenium :: WebDriver :: Error :: WebDriverError)

时间:2012-04-13 17:30:31

标签: amazon-ec2 jenkins headless headless-browser selenium-chromedriver

  

可能重复:
  unable to connect to chromedriver 127.0.0.1:46050 (Selenium::WebDriver::Error::WebDriverError)

我在亚马逊ec2 api上安装了jenkins,我正在使用jenkins进行无头黄瓜测试。

我下载了chromedriver,解压缩并将其复制到我的路径(/ usr / bin)并更改了模式:

wget http://chromium.googlecode.com/files/chromedriver_linux32_18.0.1022.0.zip

解压缩chromedriver_linux32_18.0.1022.0.zip

cp chromedriver / usr / bin

sudo chmod + x / usr / bin / chromedriver

但是当我运行我的测试(HEADLESS =真正的黄瓜功能)时,我收到此错误:

无法连接到chromedriver http://127.0.0.1:50299(Selenium :: WebDriver :: Error :: WebDriverError)

chromedriver:

的/ usr /斌/ chromedriver

google-chrome:

的/ usr / bin中/谷歌铬

我的Gemfile中有无头宝石,我在env.rb中也有以下代码:

如果ENV ['HEADLESS']

  require 'headless'

  headless = Headless.new

  headless.start

  at_exit do

    headless.destroy

  end

end

我错过了什么吗?有什么想法吗?

0 个答案:

没有答案