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

DevToolsActivePort file doesn't exist #101

Open
mthomas-github opened this issue Aug 1, 2023 · 1 comment
Open

DevToolsActivePort file doesn't exist #101

mthomas-github opened this issue Aug 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@mthomas-github
Copy link

mthomas-github commented Aug 1, 2023

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 mthomas-github added the bug Something isn't working label Aug 1, 2023
@bwalderman
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants