public void ClickOnReportsTab() { if (ReportsTab.Displayed) { ReportsTab.Click(); } else { throw new Exception("Element is not found or not clickable"); } }
/// <summary> /// Clicks the user-specified button or link and then waits for a window to close or open, or a page to load, /// depending on the button that was clicked /// </summary> /// <param name="buttonOrLinkElem">The element to click on</param> public dynamic ClickToAdvance(IWebElement buttonOrLinkElem) { if (buttonOrLinkElem.GetAttribute("id") == ReportsTab.GetAttribute("id")) { buttonOrLinkElem.Click(); //Browser.WaitForElement(Bys.EnterACPDActivityPage.CategoryDrpDn, TimeSpan.FromSeconds(20), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); ReportsPage rp = new ReportsPage(Browser); //rp.WaitForInitialize(); return(rp); } else { throw new Exception("No button or link was found with your passed parameter"); } return(null); }