I\'m looking for a way to reuse one NUnit test suite without duplicating the entire suite for each browser. It seems like I would need a new fixture for each browser. Can I send
[SetUp]
public void CreateDriver()
{
//driver = new TWebDriver();
if (typeof(TWebDriver).Name == "ChromeDriver")
{
ChromeOptions options = new ChromeOptions();
options.AddArguments("--incognito");
driver = new ChromeDriver(options);
}
else if (typeof(TWebDriver).Name == "FirefoxDriver")
{
FirefoxOptions options = new FirefoxOptions();
options.UseLegacyImplementation = false;
options.SetPreference("browser.private.browsing.autostart", true);
options.AddArgument("-private");
driver = new FirefoxDriver(options);
}
else if (typeof(TWebDriver).Name == "InternetExplorerDriver")
{
InternetExplorerOptions options = new InternetExplorerOptions();
options.BrowserCommandLineArguments = "-private";
options.EnsureCleanSession = true;
options.IgnoreZoomLevel = true;
options.EnablePersistentHover = true;
driver = new InternetExplorerDriver(options);
} else
driver = new TWebDriver();
}