public void OnceSetUp() { log = new TestResultsLogging(); ChromeOptions options = new ChromeOptions(); options.AddArgument("no-sandbox"); driver = new ChromeDriver(options); driver.Navigate().GoToUrl("http://the-internet.herokuapp.com/"); driver.Manage().Window.Maximize(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(15); Console.WriteLine($"Test name : {log.GetTestName()}"); driver.Manage().Timeouts().PageLoad.Add(TimeSpan.FromSeconds(30)); }
public void TearDown() { log = new TestResultsLogging(); screen = new Screen(); string testStatus = log.GetTestStatus(); Console.WriteLine($"The test tatus : {testStatus}"); bool testSatus = log.GetTestStatus($"{ testStatus }"); string testName = log.GetTestName(); screen.CapturingFailedTest(testSatus, testName, driver); Console.WriteLine("-------------"); driver.Quit(); }