selenium: Selenium Ruby (Grid), has a huge delay after calling driver.quit on IE11 when encountering Net::ReadTimeout

Meta -

OS: Windows 7 / 8.1 Selenium Version: At least 10 different ruby bindings from 2.53.4 through to 3.5.2 Browser: IE11 on Grid

Preface to our usage -

We increase our timeouts in the bindings to 120s using the following syntax

Capybara.register_driver :selenium do |app|
    client = Selenium::WebDriver::Remote::Http::Default.new
    client.timeout = 120
    Capybara::Selenium::Driver.new(
      app,
      browser: :remote,
      url: ENV['hub_url'],
      desired_capabilities: caps,
      http_client: client,
    )
  end

Expected Behavior -

When we timeout we expect the timestamps between running the last command and then receiving a timeout to be 120s +/- 0.25s (Based off the default interrogation / polling rate). This works

Then we run our after hook. Which is contained in the code below (Steps to reproduce). This should run in a couple of seconds.

Actual Behavior -

This however has a “huge” delay between the first and second log statements. Circa 150s

Steps to reproduce -

After do |scenario|
  $LOG.info("Attempting to quit session.driver for #{scenario.name}") #This log is the penultimate
  Capybara.current_session.driver.quit
  $LOG.info('Quit driver for this scenario') #This log is the last and it takes 150s
end

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 32 (32 by maintainers)

Most upvoted comments

If you run this with $DEBUG = true you can see the output of what is sent to and received from the grid. This info could be useful to debugging.