EdgeWebDriver icon indicating copy to clipboard operation
EdgeWebDriver copied to clipboard

DevToolsActivePort file doesn't exist

Open mthomas-github opened this issue 2 years ago • 1 comments

Hello I'm running Python Script Using MS Edge WebDriver.

If I look in my C:\EdgeDriverTemp I do not see DevToolsActivePort either

Selenum Version: 4.11.0 Edge Version: 115.0.1901.188 Edge WebDriver: 115.0.1901.188

Selenium Python Code edgeOption = Options() edgeOption.use_webview = True edgeOption.add_argument("start-maximized") edgeOption.add_argument("--remote-debugging-port=0") edgeOption.add_argument("--disable-extensions") edgeOption.add_argument("--user-data-dir=C:\EdgeDriverTemp") edgeOption.add_argument("suppress-message-center-popups") edgeOption.binary_location = r"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" s = Service(executable_path='C:\DRIVERS\msedgedriver.exe') browser = webdriver.Edge(service=s, options=edgeOption)

Error: main - ERROR - Message: unknown error: DevToolsActivePort file doesn't exist Stacktrace: Backtrace: GetHandleVerifier [0x00007FF6E4B65432+69586] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF6E4AF5672+760242] (No symbol) [0x00007FF6E48AB8CC] (No symbol) [0x00007FF6E48E0FBA] (No symbol) [0x00007FF6E48DC168] (No symbol) [0x00007FF6E491B431] (No symbol) [0x00007FF6E4912B83] (No symbol) [0x00007FF6E48E4B6B] (No symbol) [0x00007FF6E48E6024] Microsoft::Applications::Events::ILogManager::DispatchEventBroadcast [0x00007FF6E4D3D239+1294553] (No symbol) [0x00007FF6E49649F4] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF6E4A43DF1+33073] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF6E4A3C409+1865] Microsoft::Applications::Events::ILogManager::DispatchEventBroadcast [0x00007FF6E4D3BE11+1289393] Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF6E4AFDC78+20184] Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF6E4AFA304+5476] Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF6E4AFA3FC+5724] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF6E4AEECB1+733169] BaseThreadInitThunk [0x00007FFD0B017614+20] RtlUserThreadStart [0x00007FFD0C8426B1+33]

mthomas-github avatar Aug 01 '23 20:08 mthomas-github

Hi @mthomas-github

Sorry for the delayed response. When you use the use_webview option, Edge WebDriver is launching your WebView2 host app directly instead of the Edge browser, so none of the command line args added with add_arguments will work as expected. To pass command line arguments to the WebView2 browser process, you need to use the webViewOptions object. Selenium EdgeOptions doesn't have a dedicated method to set this yet, so you'll need to use edgeOptions.add_experimental_option in Python.

bwalderman avatar Dec 15 '23 21:12 bwalderman