Error at startup (Capybara :: TimeoutError) '

When I run my function using the @firebug tag, my test runs and passes without a hitch, but when I @firebug tag and run the test headless, I get a timed out (Capybara::TimeoutError) error timed out (Capybara::TimeoutError) . Unfortunately, I cannot provide much more information. I do not expect an answer, but any help to point me in the right direction would be greatly appreciated.

+4
source share
1 answer

try putting @javascript and then run headless ... hope it works ...

You can try another solution. I removed this error using Google Chrome instead of Firefox and used the curb protocol. You must get the chrome driver first. I do not get this error without removing fakeweb (which I thought was the culprit)

  yum install curl yum install curl-devel gem install curb cd /usr/bin/chromedriver chmod +x /usr/bin/chromedriver 

Include this in your env.rb

 require 'selenium/webdriver/remote/http/curb' Capybara.register_driver :selenium do |app| #http_client = Selenium::WebDriver::Remote::Http::Default.new #http_client.timeout = 100 #Capybara::Selenium::Driver.new(app, :browser => :firefox, :http_client => http_client) http_client = Selenium::WebDriver::Remote::Http::Curb.new Capybara::Selenium::Driver.new(app, :browser => :chrome, :http_client => http_client) end 

Hope this helps ...

+3
source

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


All Articles