我有一个Rails 3.2应用程序。我正在尝试设置使用Google chrome运行的黄瓜测试。此外Selenium WebDriverError on rails 3.2 with yellow
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
,我已经安装了它在/ usr/bin中的二进制的chromedriver /:我添加的配置对于同
➜ ~ ls -lah /usr/bin | grep chrome
-rwxrwxrwx 1 root root 18M May 20 15:42 chromedriver
lrwxrwxrwx 1 root root 32 Apr 6 10:19 google-chrome -> /opt/google/chrome/google-chrome
当我试图运行一个简单的功能,它只是打开google.com和搜索的东西,我得到以下错误:
unexpected response, code=404, content-type=""
unknown command: session/url (Selenium::WebDriver::Error::WebDriverError)
./features/step_definitions/google_steps.rb:2:in `/^I am on the google page$/'
features/google.feature:3:in `Given I am on the google page'
休息的痕迹:
unexpected response, code=404, content-type=""
unknown command: session/url (Selenium::WebDriver::Error::WebDriverError)
/home/arkiver/.rvm/gems/[email protected]/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/http/common.rb:66:in `create_response'
/home/arkiver/.rvm/gems/[email protected]/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/http/default.rb:66:in `request'
/home/arkiver/.rvm/gems/[email protected]/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
/home/arkiver/.rvm/gems/[email protected]/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/bridge.rb:619:in `raw_execute'
/home/arkiver/.rvm/gems/[email protected]/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/bridge.rb:597:in `execute'
/home/arkiver/.rvm/gems/[email protected]/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/bridge.rb:103:in `get'
/home/arkiver/.rvm/gems/[email protected]/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/common/navigation.rb:14:in `to'
/home/arkiver/.rvm/gems/[email protected]/gems/capybara-2.1.0/lib/capybara/selenium/driver.rb:90:in `reset!'
/home/arkiver/.rvm/gems/[email protected]/gems/capybara-2.1.0/lib/capybara/session.rb:77:in `reset!'
/home/arkiver/.rvm/gems/[email protected]/gems/capybara-2.1.0/lib/capybara.rb:245:in `block in reset_sessions!'
/home/arkiver/.rvm/gems/[email protected]/gems/capybara-2.1.0/lib/capybara.rb:245:in `each'
/home/arkiver/.rvm/gems/[email protected]/gems/capybara-2.1.0/lib/capybara.rb:245:in `reset_sessions!'
/home/arkiver/.rvm/gems/[email protected]/gems/capybara-2.1.0/lib/capybara/cucumber.rb:10:in `After'
需要帮助搞清楚我在这里丢失了什么。