Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the Chrome search engine selector by default #2768

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 16, 2024

  1. Disable the Chrome search engine selector by default

    In recent versions of Chrome, a search engine selection modal is shown when first opening the browser, which causes specs to fail  with errors like this:
    
        Selenium::WebDriver::Error::UnknownError:
                unknown error: failed to close window in 20 seconds
                  (Session info: chrome=128.0.6613.36)
    
    Presumably this is because the spec is trying to interact with the browser but can't get past the selection screen.
    
    This seems to be a common issue:
    
    - https://stackoverflow.com/questions/78831994/how-to-skip-choose-search-engine-with-capybara-selenium-chrome
    - https://www.reddit.com/r/learnpython/comments/1eoapcb/selenium_dosent_find_google_search_engine_option/
    
    Adding this option appears to fix it, but I've only tested by defining my own driver locally with this argument - not sure how I'd write a spec for this driver definition?
    
    Also I'm not sure if this option is defined for older versions of Chrome (or is it chromedriver?) - would this result in errors when using a version where this option isn't supported?
    dgmstuart committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    0a9094b View commit details
    Browse the repository at this point in the history