Net::ReadTimeout (Net::ReadTimeout) Selenium Ruby

后端 未结 2 406
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-09 03:45

I\'ve seen a few posts related to timeout errors within Selenium. This is becoming more and more unbearable as it\'s rendering my test pack unusable. I\'m testing a webpag

2条回答
  •  失恋的感觉
    2020-12-09 04:19

    The default timeout is 60 seconds. One thing to try is to adjust the internal timeout to see if that fixes it:

    Capybara.register_driver :selenium do |app|
      profile = Selenium::WebDriver::Firefox::Profile.new
      client = Selenium::WebDriver::Remote::Http::Default.new
      client.timeout = 120 # instead of the default 60
      Capybara::Selenium::Driver.new(app, browser: :firefox, profile: profile, http_client: client)
    end
    

提交回复
热议问题