Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97813

Parallel For Loop Selenium C# - NOT A TEST

$
0
0

I wanna make a parallel For loop that will open an some changed link. But I get an exception when I'm doing it in parallel..

Any Help?

I searched for solutions online and only found ones that are using Nunit (Runming few selected test - Not my case).

Ex.

Parallel.For(0, 5, i => {
#region Driver Init
ChromeOptions options = new ChromeOptions();
options.AddArguments("--user-data-dir=C:\\Users\\Galdo\\AppData\\Local\\Google\\Chrome\\User Data");
options.AddArguments("--profile-directory=Profile 1");
ChromeDriver chromeDriver = new ChromeDriver(options);
#endregion       chromeDriver.Navigate().GoToUrl("https://www.youtube.com/id="+i);
            });

Exception :

OpenQA.Selenium.WebDriverException HResult=0x80131500 Message=unknown error: failed to write prefs file (Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 10.0.17134 x86_64) Source=WebDriver StackTrace: at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String –


Viewing all articles
Browse latest Browse all 97813

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>