private void TakeScreenshotForTestFailure() { if (ScreenshotTaker != null) { ScreenshotTaker.CreateScreenshotIfTestFailed(); Reporter.ReportTestOutcome(ScreenshotTaker.ScreenshotFilePath); } else { Reporter.ReportTestOutcome(""); } }
public void SetupforEveryTestMethod() { driver = GetChromeDriver(); SampleAppPage = new SampleApplicationPage(driver); Reporter.AddTestCaseMetadataToHtmlReport(TestContext); driver.Manage().Window.Maximize(); TheTestUser = new TestUser(); TheTestUser.Email = "*****@*****.**"; TheTestUser.Password = "******"; TheTestUser.firstname = Helper.RandomString(5); TheTestUser.lastname = Helper.RandomString(3); TheTestUser.address = Helper.RandomString(5); TheTestUser.city = Helper.RandomString(6); TheTestUser.zipcode = Helper.RandomInt(6); TheTestUser.selectCountry = Country.Canada; ScreenshotTaker = new ScreenshotTaker(driver, TestContext); //TheTestUser.selectCommonIntrest = CommonIntrest.Reading; }