public void Dispose() { lock (this) { if (Pages != null) { Pages.Dispose(); Pages = null; } } }
public void TestIfBrowserOpensAndCloses() { var local = new PageCollection(); local.OpenBrowser(); var process = Process.GetProcessesByName("msedgedriver"); Assert.IsNotNull(process); Assert.IsTrue(process.Length == 1); local.Dispose(); Assert.IsTrue(process[0].HasExited); }
public void TestAlternativeBrowserChrome() { var local = new PageCollection(options => { options.Browser <ChromeBrowser>("chromedriver.exe"); }); local.OpenBrowser(); var process = Process.GetProcessesByName("chromedriver"); Assert.IsNotNull(process); Assert.IsTrue(process.Length == 1); local.Dispose(); Assert.IsTrue(process[0].HasExited); }
public void Cleanup() { autoweb.Dispose(); }