How to dispose after each test in parallel testing xunit?

1.1k Views Asked by At

My tests in Selenium Xunit 2.0 from different collection class run parallel and dispose method call once only. I want to call to dispose the method after each test run even if they run in parallel.

[TestClass]
    public class Basic : IDisposable
    {
       
        protected void StopDriver()
        {
            #capture screenshot here
        }

        public void Dispose()
        {
            StopWebDriver();
            WebDriver.Dispose();
        }
    }
0

There are 0 best solutions below