Skip to content

[🚀 Feature]: Opt in to Selenium Manager with Browser Version #13128

@titusfortner

Description

@titusfortner

Feature and motivation

The goal for SM while in beta has been to maintain backwards compatibility and require users to "opt-in" to using it.

Right now you opt in by not specifying driver location in Service class or setting it in System Property, and removing any drivers on PATH. Sometimes you don't have full control over this (CI tools like GitHub Actions: #13081), so there should be an alternate way to opt-in. One option is to be explicit and support "SE_SELENIUM_MANAGER=true" (#12985). Perhaps a better option is to be implicit and have users opt-in by specifying a browserVersion that does not match what is on the system.

If there is an old driver on the system, right now we use it, regardless of anything else.

This request would have us:

  1. Check local browser version
  2. If it matches provided browserVersion in capabilities, use that browser
  3. If they don't match, download matching browser
  4. Look for matching driver version on the system
  5. If found, use it.
  6. If not found, download it

So the only difference between Selenium 4 behavior and Selenium 5 behavior will be how we handle it when browserVersion is empty:

Selenium 4 behavior is to use whatever driver is found;
Selenium 5 behavior is to determine the local browser version and get the right driver for it even if it is not what is on the system.

Usage example

options = Selenium::WebDriver::Options.chrome(browser_version: "stable")
driver = Selenium::WebDriver.for :chrome, options: options

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-rustRust code is mostly Selenium ManagerI-enhancementSomething could be better

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions