-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-pyPython BindingsPython BindingsI-defectSomething is not working as intendedSomething is not working as intended
Description
What happened?
When using Selenium to launch Chrome, the browser does not open, and instead, an error occurs. However, the error message is blank.
How can we reproduce the issue?
selenium version:4.27.1
from selenium.webdriver.chrome.service import Service
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
chromedriver_path = "M:/chromedriver-win64/chromedriver-win64/chromedriver.exe"
service = Service(executable_path=chromedriver_path)
options = webdriver.ChromeOptions()
options.add_argument("--disable-extensions")
driver = webdriver.Chrome(service=service, options=options)
try:
driver.get("https://www.google.com")
except Exception as e:
print(f"error: {e}")Relevant log output
WebDriverException Traceback (most recent call last)
Cell In[1], line 15
13 options = webdriver.ChromeOptions()
14 options.add_argument("--disable-extensions")
---> 15 driver = webdriver.Chrome(service=service, options=options)
17 try:
19 driver.get("https://www.google.com")
File d:\program files\python38\lib\site-packages\selenium\webdriver\chrome\webdriver.py:69, in WebDriver.__init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, service, keep_alive)
66 if not service:
67 service = Service(executable_path, port, service_args, service_log_path)
---> 69 super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
70 port, options,
71 service_args, desired_capabilities,
72 service_log_path, service, keep_alive)
File d:\program files\python38\lib\site-packages\selenium\webdriver\chromium\webdriver.py:93, in ChromiumDriver.__init__(self, browser_name, vendor_prefix, port, options, service_args, desired_capabilities, service_log_path, service, keep_alive)
90 self.service.start()
92 try:
---> 93 RemoteWebDriver.__init__(
94 self,
95 command_executor=ChromiumRemoteConnection(
96 remote_server_addr=self.service.service_url,
97 browser_name=browser_name, vendor_prefix=vendor_prefix,
98 keep_alive=keep_alive, ignore_proxy=_ignore_proxy),
99 options=options)
100 except Exception:
101 self.quit()
File d:\program files\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:266, in WebDriver.__init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector, options)
264 self.file_detector = file_detector or LocalFileDetector()
265 self.start_client()
--> 266 self.start_session(capabilities, browser_profile)
File d:\program files\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:357, in WebDriver.start_session(self, capabilities, browser_profile)
354 w3c_caps = _make_w3c_caps(capabilities)
355 parameters = {"capabilities": w3c_caps,
356 "desiredCapabilities": capabilities}
--> 357 response = self.execute(Command.NEW_SESSION, parameters)
358 if 'sessionId' not in response:
359 response = response['value']
File d:\program files\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:418, in WebDriver.execute(self, driver_command, params)
416 response = self.command_executor.execute(driver_command, params)
417 if response:
--> 418 self.error_handler.check_response(response)
419 response['value'] = self._unwrap_value(
420 response.get('value', None))
421 return response
File d:\program files\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:207, in ErrorHandler.check_response(self, response)
205 value = response['value']
206 if isinstance(value, str):
--> 207 raise exception_class(value)
208 if message == "" and 'message' in value:
209 message = value['message']
WebDriverException: Message:Operating System
Window 11
Selenium version
4.27.1 python
What are the browser(s) and version(s) where you see this issue?
Chrome 133.0.6943.127
What are the browser driver(s) and version(s) where you see this issue?
Chromedriver 133.0.6943.127
Are you using Selenium Grid?
No response
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-pyPython BindingsPython BindingsI-defectSomething is not working as intendedSomething is not working as intended