Skip to content

Parallel execution - Selenium C# NUnit #4634

Answered by stevenaw
ivanlgarcia28 asked this question in Q&A
Discussion options

You must be logged in to vote

Happy to help @ivanlgarcia28 .
Based on your current setup you are storing the webdriver instance in a static variable which means it will be shared with all the tests that access it. If you're running into issues with this setup only when your tests run in parallel then it may help to have an instance of the IWebDriver class per test. Perhaps something like below would help ensure each test works on a different instance of Selenium so that operations from one test don't interfere with another running at the same time.

I'd recommend also updating to the latest versions of Selenium.WebDriver if you can to ensure you're using any of the latest bugfixes. Your sample uses 4.14 but the latest …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ivanlgarcia28
Comment options

@stevenaw
Comment options

Answer selected by ivanlgarcia28
@ivanlgarcia28
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants