Docker + Rspec + Capybara - arguments [0] - undefined

I'm trying to get my specifications to work tirelessly in the docker - they work fine locally on my mac, but when I run them inside the docker container, I get this error (it repeats several times)

Selenium::WebDriver::Error::JavascriptError: arguments[0] is undefined # [remote server] https://foobar.com/ line 68 > Function:1:1:in `anonymous' # [remote server] https://foobar.com/:68:20:in `handleEvaluateEvent' # ./spec/features/foo_spec.rb:15:in `block (2 levels) in <top (required)> 

Xvfb works: Xvfb :99.0 -screen 0 1366x768x16

I also tried making xvfb-run rspec and got the same errors.

spec_helper.rb:

 Capybara.default_driver = :selenium Capybara.javascript_driver = :selenium 

What happens that it cannot work inside the docker?

+6
source share
1 answer

The cause of this error is the following:

 >> webdriver.execute_script("return typeof arguments[0]", "foo") => "undefined" 

Apparently, this is a bug with Firefox 35 and webdriver. There is a problem for this - https://code.google.com/p/selenium/issues/detail?id=8390 .

+1
source

Source: https://habr.com/ru/post/979228/


All Articles