/// <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").Equals(CreditSummaryTab.GetAttribute("id"))) { buttonOrLinkElem.Click(); CreditSummaryPage page = new CreditSummaryPage(Browser); page.WaitForInitialize(); return(page); } else if (buttonOrLinkElem.GetAttribute("id").Equals(EnterCPDActBtn.GetAttribute("id"))) { buttonOrLinkElem.Click(); //Browser.WaitForElement(Bys.EnterACPDActivityPage.CategoryDrpDn, TimeSpan.FromSeconds(20), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); EnterACPDActivityPage eap = new EnterACPDActivityPage(Browser); eap.WaitForInitialize(); return(eap); } else { throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, or if the button is already added, then the page you were on did not contain the button."); } return(null); }
/// <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") == CreditSummaryTab.GetAttribute("id")) { buttonOrLinkElem.Click(); HoldingAreaPage page = new HoldingAreaPage(Browser); //page.WaitForInitialize(); return(page); } else { throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, or if the button is already added, then the page you were on did not contain the button."); } return(null); }