K
K
kykyryky2016-10-04 10:44:35
Google Chrome
kykyryky, 2016-10-04 10:44:35

How to run multiple instances of Chrome browser with current profile?

Hello. I need to run several tests at the same time on different sites in the browser (google chrome) with the current profile.
I am able to run tests concurrently in "pure" chrome instances. I can run chrome with the profile that works in the system. But when trying to launch a second instance of the same kind, an error appears in the webdriver:
370d6cdb71ea408191300b5359fae316.jpg
Although the browser still starts. But the test does not start in it.
I run it like this:

var options = new ChromeOptions();
var userName = Environment.UserName;
options.AddArguments("--user-data-dir=C:\\Users\\" + userName + "\\AppData\\Local\\Google\\Chrome\\User Data");
IWebDriver webDriver = new ChromeDriver(options);

How can this problem be solved?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question