Skip to content

[🐛 Bug]: [dotnet] Chrome browser may not initialize if chromedriver file path is not specified #15566

Open
@PCG-MMast

Description

@PCG-MMast

Description

Recently upgraded from selenium 3.141.0 to 4.29.0.

  1. When creating a new ChromeDriver object, Chrome does not open.
  2. When calling any action on the newly initialized driver object, an error is thrown (error differs based on the method called)
  3. Why: when the user has a separate chromedriver executable in a different file location on their computer, there is a chance that the underlying selenium manager service (selenium-manager.exe) will find that executable and its file path instead of the latest installed one in the project/solution. If that executable is very old, the driver will not be compatible with newer versions of chrome. In my case, the other chromedriver executable was in C:\Program Files (x86)\SomeThirdPartyFolderAndSubfolders

Reproducible Code

// driver instance is returned, but the Capabilities property contains errors and the 
// chromedriver filepath is not the expected file path
var driver = new ChromeDriver();

// Throws an error message similar to: The setWindowRect command returned an unexpected error. unknown command
// This error is a red herring. The issue is that the driver object was not initialized correctly
driver.Manage().Window.Position = new Point(0, 0);

ℹ️ Last known working version: 3.141.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-dotnet.NET BindingsI-regressionSomething was working but we "fixed" itOS-windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions