-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
C-pyPython BindingsPython BindingsG-msedgedriverRequires fixes in MSEdgeDriverRequires fixes in MSEdgeDriverI-defectSomething is not working as intendedSomething is not working as intendedOS-windows
Description
Description
my info:
windows11
edge:138
I want to use edge-IE-mode to test website.
I request http://localhost:53126/status ๏ผand get the response:
{ "value" : { "build" : { "version" : "4.8.1.0 (32-bit)" }, "message" : "Ready to create session", "os" : { "arch" : "x64", "name" : "windows", "version" : "10.0.26100.4484 (WinBuild.160101.0800)" }, "ready" : true } }
when I run my python code, the edge can be opened, and the IE mode successfully start, the initial_browser_url opened.
I've attempted to disable Internet Explorer's Protected Mode by modifying the registry and Group Policy settings, but it didn't work.

Reproducible Code
from selenium import webdriver
from selenium.webdriver.ie.service import Service
import logging
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
filename='selenium.log'
)
selenium_logger = logging.getLogger('selenium')
selenium_logger.setLevel(logging.DEBUG)
ie_options = webdriver.IeOptions()
ie_options.attach_to_edge_chrome = True
ie_options.force_create_process_api = True
ie_options.edge_executable_path = "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
ie_options.initial_browser_url = "http://www.baidu.com"
ie_options.ignore_protected_mode_settings = True
ie_options.ignore_zoom = True
ie_options.add_argument("--edge-skip-compat-layer-relaunch")
driver_service = Service(
executable_path=r"D:\chromeDriver\IEDriverServer_Win32_4.8.1\IEDriverServer.exe"
)
driver = webdriver.Ie(service=driver_service, options=ie_options)
print("driver = webdriver.Ie(service=driver_service, options=ie_options)")
driver.get("http://www.baidu.com")
driver.quit()
Debugging Logs
Traceback (most recent call last):
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\connectionpool.py", line 468, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\connectionpool.py", line 463, in _make_request
httplib_response = conn.getresponse()
File "E:\python3.8.10\lib\http\client.py", line 1344, in getresponse
response.begin()
File "E:\python3.8.10\lib\http\client.py", line 307, in begin
version, status, reason = self._read_status()
File "E:\python3.8.10\lib\http\client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "E:\python3.8.10\lib\socket.py", line 669, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\cxs1.3\trunk\src\com\fingard\ๆ็\ๆต่ฏ\test4.py", line 34, in
print("driver = webdriver.Ie(service=driver_service, options=ie_options)")
File "E:\python3.8.10\cxs1.3\lib\site-packages\selenium\webdriver\edge\webdriver.py", line 45, in init
super().init(
File "E:\python3.8.10\cxs1.3\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 66, in init
super().init(command_executor=executor, options=options)
File "E:\python3.8.10\cxs1.3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 241, in init
self.start_session(capabilities)
File "E:\python3.8.10\cxs1.3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 329, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
File "E:\python3.8.10\cxs1.3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 382, in execute
response = self.command_executor.execute(driver_command, params)
File "E:\python3.8.10\cxs1.3\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 404, in execute
return self._request(command_info[0], url, body=data)
File "E:\python3.8.10\cxs1.3\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 428, in _request
response = self._conn.request(method, url, body=body, headers=headers, timeout=self._client_config.timeout)
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\request.py", line 81, in request
return self.request_encode_body(
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\request.py", line 173, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\poolmanager.py", line 376, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\connectionpool.py", line 802, in urlopen
retries = retries.increment(
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\util\retry.py", line 552, in increment
raise six.reraise(type(error), error, _stacktrace)
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\packages\six.py", line 770, in reraise
raise value
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\connectionpool.py", line 716, in urlopen
httplib_response = self._make_request(
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\connectionpool.py", line 470, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "E:\python3.8.10\cxs1.3\lib\site-packages\urllib3\connectionpool.py", line 358, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=53126): Read timed out. (read timeout=120)
Metadata
Metadata
Assignees
Labels
C-pyPython BindingsPython BindingsG-msedgedriverRequires fixes in MSEdgeDriverRequires fixes in MSEdgeDriverI-defectSomething is not working as intendedSomething is not working as intendedOS-windows