public void VerifyPageIsOpenSuccessfully(ORTMenu menuName) { switch (menuName) { case ORTMenu.Analysis: { Verify.ElementIsPresent(lnkAnalysis); Actions.Click(lnkAnalysis); Waits.WaitForElementToBeClickable(lnkAnalysis, WaitType.Medium); Verify.ElementIsPresent(lnkAnalysis); Verify.ExactTextInElementIs(lnkAnalysis, ORTConstants.ORTConstants.MenuAnalysis); break; } case ORTMenu.ContactSupport: { Verify.ElementIsPresent(lnkCustomerSupport); Actions.Click(lnkCustomerSupport); Waits.WaitForElementToBeClickable(lnkCustomerSupport, WaitType.Medium); Verify.ElementIsPresent(lnkCustomerSupport); Verify.ExactTextInElementIs(lnkCustomerSupport, ORTConstants.ORTConstants.MenuContactSupport); break; } case ORTMenu.Reports: { Verify.ElementIsPresent(lnkReport); Actions.Click(lnkReport); Waits.WaitForElementToBeClickable(lnkReport, WaitType.Medium); Verify.ElementIsPresent(lnkReport); Verify.ExactTextInElementIs(lnkReport, ORTConstants.ORTConstants.MenuReports); break; } } }
/// <summary> /// /// </summary> /// <param name="menuName"></param> public void ClickMenu(ORTMenu menuName) { switch (menuName) { case ORTMenu.Analysis: { Actions.Click(lnkAnalysis); Waits.WaitForPageLoad(); break; } case ORTMenu.ContactSupport: { Actions.SwitchToDefaultFrame(); Actions.Click(lnkCustomerSupport); Waits.WaitForPageLoad(); break; } case ORTMenu.Reports: { Actions.Click(lnkReport); Waits.WaitForPageLoad(); break; } default: { Log.Error("No valid menu found"); break; } } }