SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.75k stars 8.2k forks source link

[🐛 Bug]: self.execute(Command.NEW_SESSION, caps)["value"] on very minimal script #14535

Closed GregB98 closed 1 week ago

GregB98 commented 1 month ago

What happened?

Selenium fails to start driver even tough wether it is in the path, not in the path, is in C:\Windows, nothing helps

How can we reproduce the issue?

I do not know because I can't figure it out

Code: 
from selenium import webdriver as wd
driver = wd.Chrome()
driver.get('https://google.com')

Relevant log output

Traceback (most recent call last):
  File "c:\Users\x\Documents\EOD automatizalas\eodautmatizalas.py", line 5, in <module>
    driver = webdriver.Chrome()
             ^^^^^^^^^^^^^^^^^^
  File "C:\Users\x\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__
    super().__init__(
  File "C:\Users\x\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 66, in __init__
    super().__init__(command_executor=executor, options=options)
  File "C:\Users\x\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 212, in __init__
    self.start_session(capabilities)
  File "C:\Users\x\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 299, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\x\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 354, in execute
    self.error_handler.check_response(response)
  File "C:\Users\x\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 193, in check_response
    raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
</body>
</html>

Operating System

Windows 10

Selenium version

4.25.0

What are the browser(s) and version(s) where you see this issue?

chrome 129

What are the browser driver(s) and version(s) where you see this issue?

chrome 129.0.668

Are you using Selenium Grid?

No response

github-actions[bot] commented 1 month ago

@GregB98, 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 I-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!

navin772 commented 3 weeks ago

Hi @GregB98, you mentioned self.execute(Command.NEW_SESSION, caps)["value"] in the issue title but the reproducible code doesn't include this, can you give a standalone minimal reproducible example that can be run to get this issue?

diemol commented 1 week ago

I will close this as the issue has not had any more activity.