Reputation: 21
First, this is not a duplicate question! Read & watch before mark as a duplicate! This question I ask about open multiple chrome profile using selenium c# and navigate about URL, not duplicate in this thread here as you mention, Ok? Shame on your budgets and no help!
You have no Knowledge about Selenium and I don't want your answer to get out of my question ok? DebanjanB
I would like to run multiple Selenium Chrome Portable Profile at the same time. I would like to run more than one instance simultaneously.
And using
Navigate().GoToUrl("http://www.somesite.com");
If just one instance of the program is running everything goes fine. If I start a second instance while the first one is running the browser is opened but the automation doesn't start.
This error appears:
ChromeDriver driver = new ChromeDriver(service, options); OpenQA.Selenium.WebDriverException: 'unknown error: Chrome failed to start: exited normally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location D:\GoogleChromePortable\GoogleChromePortable.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Everything is in this video: https://www.useloom.com/share/58725b7fdbb447df86b983107c3b35cf
How can I open multiple chrome profile and each profile open the URL as described in the video!
I'm using C# for selenium, chrome is version 68, chromedriver 2.41
!
I'm using a custom profile and a ChromePortable binary.
Thanks!
Upvotes: 2
Views: 5316
Reputation: 8489
This is due to same user-data-dir path configured for both instance. The user-data directory get locked by the first instance and the second instance fails with exception as the directory is in use. The solution is to use two different user-data directory for each driver.
Please read this answer for more details.
Upvotes: 7