User Data Directory Is Already In Use

I know this. You have one or more Chrome browser opened manually before you start the test. Contention arises for the default user-data directory. Chrome browser is apparently designed very sensitive about the contention.

A quick work around is to close the Chrome browsers before you start the test. This way works, but very cumbersome.

Another work around is

The solution I came up with that has worked every time so far (15 tests currently) was to clone the profile to a location inside the project every time the program runs and then point selenium to that clone.

as quoted from c# - How to open a Chrome Profile through --user-data-dir argument of Selenium - Stack Overflow

1 Like