C# Selenium 4. devTools.GetDevToolsSession() doesn't work in parallel tests execution

158 views
Skip to first unread message

Natasha UA

unread,
Mar 23, 2022, 3:18:32 AM3/23/22
to Selenium Users
I try to run tests in 2 parallel threads and I get tests run freezing:

Screenshot_5.png

driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), chromeOptions, TimeSpan.FromMinutes(3));
IDevTools _devTools = driver as IDevTools;
IDevToolsSession _session = _devTools.GetDevToolsSession();  // the problem is here
V96.Fetch.FetchAdapter _fetch = _session.GetVersionSpecificDomains<V96.DevToolsSessionDomains>().Fetch;

When running tests in 1 thread, they passed success.

Please, help me to fix it. :)
Thanks in advance. :)
Reply all
Reply to author
Forward
0 new messages