Cucumber error when I run my cucumber tests

2019-07-31 14:56发布

I am new to ROR. I am using Ruby 1.9.2p290, rvm 1.10.2, chromedriver version=18.0.995.0.

When I run the cucumber test by execute command:

bundle exec cucumber features/mytest.feature

I got the error message which is showing below:

(::) failed steps (::)

proxy must be of type dictionary, not null. Received: null

(Selenium::WebDriver::Error::WebDriverError)

3条回答
女痞
2楼-- · 2019-07-31 15:08

Check your selenium-webdriver version. Selenium-webdriver 2.13.0 gives me the error you described; selenium-webdriver 2.19.0 seems to work fine with the latest chromedriver.

This is compounded (on my system at least) by the fact that selenium-webdriver has a dependency on multi-json version 1.0.4 and if you have multi-json and capybara both in your bundler Gemfile, and run "bundle update", it will update multi-json to 1.1.0, and then install selenium-webdriver 2.13.0 as it's the latest version that doesn't care about multi-json versions!

(I raised this as an issue with selenium-webdriver: http://code.google.com/p/selenium/issues/detail?id=3399 - though it's a bit harsh to blame them for not using such a new version of multi-json)

查看更多
女痞
3楼-- · 2019-07-31 15:13

Also its helped me upversion selenium-webdriver to 2.17.0 (with chromedriver)

查看更多
▲ chillily
4楼-- · 2019-07-31 15:31

It seems that this error occurs since chromedriver version 18.
(irb screenshot: http://www.pastie.org/pastes/3199163)

To get a working version checkout https://github.com/flavorjones/chromedriver-helper

查看更多
登录 后发表回答