public static void BeforeAuthenticationScenario() { DriverConnections.StartBrowser(Data.BrowserType); DriverConnections.GotoURL(Data.BaseURL); new LoginPage() .Login_to_the_system(Data.Username, Data.Password); }
public void GivenThatIHaveLaunchTheBrowser(string browserType) { var status = DriverConnections.GetBrowserStatus(); if (!status.Equals(Data.BaseURL)) { DriverConnections.StartBrowser(Data.BrowserType); } }
public void GivenNavigatesToTheLoginPage(string title) { var status = DriverConnections.GetBrowserStatus(); if (!status.Equals(Data.BaseURL)) { DriverConnections.GotoURL(Data.BaseURL); new LoginPage() .Verify_the_Page_Title(title); } }
public static void AfterAuthenticationFeatuer() { if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed) { var screenshot = ((ITakesScreenshot)DriverConnections.Browser).GetScreenshot(); var filename = TestContext.CurrentContext.Test.Name + "_screenshot_" + DateTime.Now.Ticks + ".Png"; var path = Path.Combine(TestContext.CurrentContext.WorkDirectory, filename); screenshot.SaveAsFile(path, ScreenshotImageFormat.Png); TestContext.AddTestAttachment(path); } DriverConnections.StopBrowser(); }
public void BrowserTearDown() { DriverConnections.StopBrowser(); }
public void BrowserLaunch() { DriverConnections.StartBrowser(Data.BrowserType); DriverConnections.GotoURL(Data.BaseURL); }
public static void AfterAuthenticationScenario() { DriverConnections.StopBrowser(); }