Open
Description
Description
Recently upgraded from selenium 3.141.0 to 4.29.0.
- When creating a new ChromeDriver object, Chrome does not open.
- When calling any action on the newly initialized driver object, an error is thrown (error differs based on the method called)
- 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