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

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

Open
PCG-MMast opened this issue Apr 3, 2025 · 6 comments
Labels
A-needs-triaging A Selenium member will evaluate this soon! C-dotnet .NET Bindings I-regression Something was working but we "fixed" it OS-windows

Comments

@PCG-MMast
Copy link

PCG-MMast commented Apr 3, 2025

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

@PCG-MMast PCG-MMast added A-needs-triaging A Selenium member will evaluate this soon! I-defect Something is not working as intended labels Apr 3, 2025
@titusfortner
Copy link
Member

@PCG-MMast, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then J-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@github-actions github-actions bot added C-dotnet .NET Bindings D-chrome I-regression Something was working but we "fixed" it OS-windows labels Apr 3, 2025
Copy link

github-actions bot commented Apr 3, 2025

⚠️ You reported using Selenium version 4.29.0, but the latest release is 4.30.

Please verify that this issue still occurs with the latest version. If it no longer applies, you can close this issue or update your comment.

This issue will be marked "awaiting answer" and may be closed automatically if no response is received.

@github-actions github-actions bot added the J-awaiting answer Question asked of user; a reply moves it to triage again label Apr 3, 2025
@PCG-MMast
Copy link
Author

We are using latest Appium 7.2.0 which uses Selenium.WebDriver 4.29.0 as of submitting this

@titusfortner titusfortner removed the J-awaiting answer Question asked of user; a reply moves it to triage again label Apr 3, 2025
@titusfortner
Copy link
Member

We're still working out the kinks in our fancy new Issue automation process.

@titusfortner
Copy link
Member

Selenium Manager will only use the old version of the driver if the location of that driver is included in the PATH environment variable. This is as intended. Remove the folder from PATH, or specify the location you want used with an Environment Variable. You can turn on logging to see exactly what Selenium Manager is doing, I'll include the link for that below...

@titusfortner titusfortner added J-logging Applied to issues where logging information would help troubleshoot and removed I-defect Something is not working as intended D-chrome A-needs-triaging A Selenium member will evaluate this soon! J-logging Applied to issues where logging information would help troubleshoot labels Apr 3, 2025
@titusfortner
Copy link
Member

We need more information about this issue in order to troubleshoot.

Please turn on logging and re-run your code. Information on how to adjust logs for your language can be found in our
Troubleshooting documentation.

@github-actions github-actions bot added A-needs-triaging A Selenium member will evaluate this soon! and removed J-logging Applied to issues where logging information would help troubleshoot labels Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-needs-triaging A Selenium member will evaluate this soon! C-dotnet .NET Bindings I-regression Something was working but we "fixed" it OS-windows
Projects
None yet
Development

No branches or pull requests

2 participants