public void SetUpDashboardTestFixture(ReportsEntity reportData = null) { this.actions.ClearStorage(); try { this.OpenMiDashboardOnce(); } catch { Logger.Log("Second try to log in into application"); Navigate.ToMiDashboard(); this.OpenMiDashboardOnce(); } this.DataLoadStatusConfig(); TestRetryCounter.SetCurrentTestNameAndCounter(); Logger.Log(TestContext.CurrentContext.Test.ClassName); Logger.Log(TestContext.CurrentContext.Test.MethodName); TestRetryCounter.PrintRetryCounter(); if (reportData != null) { Logger.Log($"Report Code: {reportData.Code}"); Logger.Log($"Organization Unit: {reportData.PoV.OrganizationUnit}"); Logger.Log($"Business Group: {reportData.PoV.BusinessGroup}"); Logger.Log($"Business Function: {reportData.PoV.BusinessFunction}"); } this.actions.OpenReportsPage(); Wait.FromSeconds(1); }
public void TearDownDashboardTestFixture() { VerifyExpectedErrorOccurred(); TestStatus status = TestContext.CurrentContext.Result.Outcome.Status; if (status == TestStatus.Failed) { this.CaptureScreenshot(); this.CaptureDom(); DriverSingleton.Dispose(); } else { CloseAllOpenedReports(); } TestRetryCounter.SetPreviousTestName(); }