ruby-on-rails – 无法连接到chromedriver
发布时间:2020-12-16 20:44:20 所属栏目:百科 来源:网络整理
导读:我用水豚硒测试我的轨道项目.当我执行测试脚本时,它有这样的错误 Selenium::WebDriver::Error::WebDriverError: Could not find Firefox binary (os=macosx). Make sure Firefox is installed or set the path manually with Selenium::WebDriver::Firefox::
我用水豚硒测试我的轨道项目.当我执行测试脚本时,它有这样的错误
Selenium::WebDriver::Error::WebDriverError: Could not find Firefox binary (os=macosx). Make sure Firefox is installed or set the path manually with Selenium::WebDriver::Firefox::Binary.path= 我google how to use Google Chrome as the testing browser instead of Firefox 但它发生其他错误喜欢 Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver http://127.0.0.1:9515 解决方法
我有完全相同的问题.对我来说有用的是使用“chromedriver-helper”宝石.我的gemfile的一部分看起来像这样:
group :development,:test do gem 'rspec-rails' gem 'capybara' gem 'selenium-webdriver' gem 'chromedriver-helper' end (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |