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();
}
}