///// <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 (Browser.Exists(Bys.PGYAssignmentPage.SaveExitBtn)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == SaveExitBtn.GetAttribute("outerHTML")) { Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible); // ElemSet.ScrollToElement(Browser, buttonOrLinkElem); SaveExitBtn.Click(); Browser.WaitForElement(Bys.CurriculumMngPage.SearchTxt, TimeSpan.FromSeconds(300), ElementCriteria.IsVisible); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(120), ElementCriteria.IsNotVisible); return(new CurriculumMngPage(Browser)); } } if (Browser.Exists(Bys.PGYAssignmentPage.NextBtn)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == NextBtn.GetAttribute("outerHTML")) { Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(120), ElementCriteria.IsNotVisible); Thread.Sleep(1000); // ElemSet.ScrollToElement(Browser, buttonOrLinkElem); NextBtn.Click(); Browser.WaitForElement(Bys.AssignSummaryPage.EditProgramSummarytbl, TimeSpan.FromSeconds(180), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(120), ElementCriteria.IsNotVisible); return(new AssignSummaryPage(Browser)); } } 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 (Browser.Exists(Bys.AssignProgramPage.NextBtn)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == NextBtn.GetAttribute("outerHTML")) { //ElemSet.ScrollToElement(Browser, NextBtn); NextBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(120), ElementCriteria.IsNotVisible); AssignSummaryPage ASP = new AssignSummaryPage(Browser); ASP.WaitForInitialize(); return(ASP); } } 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 (Browser.Exists(Bys.CurriculumCoursePage.NextBtn)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == NextBtn.GetAttribute("outerHTML")) { // ElemSet.ScrollToElement(Browser, buttonOrLinkElem); NextBtn.Click(); //Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible); //Browser.WaitForElement(Bys.PGYAssignmentPage.UltimateTbl, TimeSpan.FromSeconds(120), ElementCriteria.IsEnabled,ElementCriteria.IsVisible); // Browser.SwitchTo().Frame(G.EnterACPDFrame); PGYAssignmentPage PGYAP = new PGYAssignmentPage(Browser); PGYAP.WaitForInitialize(); return(PGYAP); } } 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 buttonorElem) { if (Browser.Exists(Bys.AssignSummaryPage.NextBtn)) { if (buttonorElem.GetAttribute("id") == NextBtn.GetAttribute("id")) { Browser.WaitForElement(Bys.AssignSummaryPage.NextBtn, ElementCriteria.IsEnabled); Thread.Sleep(0500); ElemSet.ScrollToElement(Browser, NextBtn); NextBtn.Click(); Browser.WaitForElement(Bys.AMAPage.BreadCrumbLnksContainer, TimeSpan.FromSeconds(90), ElementCriteria.IsEnabled, ElementCriteria.IsVisible); AssignConfirmationPage ACP = new AssignConfirmationPage(Browser); ACP.WaitForInitialize(); return(ACP); } } 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); }