Skip to content

Chrome 134 breaks Selenium tests - intermittent failures with visit(visit_uri) #2800

@MatzFan

Description

@MatzFan

My test suite runs fine with Chrome 133 (Selenium 4.29.0-20250222).

Upgrading to Chrome 134 (Selenium 4.29.0-20250303) results in intermittent failures due to the session's path not updating after a call to Capybara::Session#visit. In isolating the problem I did something like this:

...
visit '/foo/bar'
puts page.current_path # => '/' - i.e. path not updated
...

I've temporarily fixed the problem with a workaround which overrides Capybara::Session#visit like so in my test helper:

def visit(url)
    10.times do
      Capybara.current_session.visit url
      return if page.current_path == url

      sleep 0.1
    end
    abort 'Capybara::Session#visit broken after 1 second wait'
  end

Happy to provide a MRE if this is not a known problem.

Note this does not appear to be duplicate of #2793 as the problem is not observed with Chrome 133.

Ruby 3.4.2
Capybara 3.40.0
selenium-webdriver 4.29.1 (in Docker container)
OS: LMDE faye (based on Debian bookworm)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions