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

System.InvalidOperationException (SessionNotCreated) and Browser Window opens non-automated on some machines #184

Open
andreas-neubacher opened this issue Jan 21, 2025 · 0 comments
Labels
feedback Feedback, discussion, or question about EdgeDriver

Comments

@andreas-neubacher
Copy link

andreas-neubacher commented Jan 21, 2025

When I drive Edge with Selenium (.NET) on a dev machine (Windows 11), everything works fine.

When I do the same on an office PC (also Windows 11), I get exception

System.InvalidOperationException: session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir (SessionNotCreated)

but the browser windows still opens - apparently in non-automated mode.

I've tried all obvious variants: Specify a different user data dir, specify different profiles, make sure that there is no edge instance running in Taskmanager, try with the "Edge Dev" version, etc.

When I look at the driver logs and run the logged command line in a terminal, I do not see any errors, but also get different behavior.

Dev Machine (working as expected):

Image

Office Machine (does not open in "automation mode"):

Image

What could cause this different behavior?
Are there any command-line options that I could apply to make the webdriver work in all environments?

@andreas-neubacher andreas-neubacher added the feedback Feedback, discussion, or question about EdgeDriver label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback Feedback, discussion, or question about EdgeDriver
Projects
None yet
Development

No branches or pull requests

1 participant