private static void TakeScreenshotIfTestFails() { string screenshotFolder = AppDomain.CurrentDomain.BaseDirectory + @"\screenshots"; Directory.CreateDirectory(screenshotFolder); var screen = DriverSingleton.GetDriver().TakeScreenshot(); screen.SaveAsFile(screenshotFolder + @"\screenshot" + DateTime.Now.ToString("yy-MM-dd_hh-mm-ss") + ".png", ScreenshotImageFormat.Png); }
public override BasePage OpenPage() { DriverSingleton.GetInstance().Navigate().GoToUrl(PageUrl); return(this); }
public void OpenBrouser() { driver = DriverSingleton.GetDriver(); }
public void CloseBrouser() { DriverSingleton.CloseDriver(); }