/// <summary> /// Action for select view. /// </summary> /// <param name="view">enum for view type</param> public void Action_SelectView(ChartView view) { string waitElement = string.Empty; switch (view) { case ChartView.Week: this.btnWeek.Click(); break; case ChartView.Month: this.btnMonth.Click(); break; case ChartView.Quarter: this.btnQuarter.Click(); break; case ChartView.Year: this.btnYear.Click(); break; default: return; } WebElementKeeper.WaitingFor_InvisibilityOfElementLocated(this._driver, By.XPath(cst_ProgressBar)); System.Threading.Thread.Sleep(TimeSpan.FromSeconds(5)); }
protected BaseElement(WebElementKeeper element) { if (element == null) { throw new ArgumentNullException(); } this.element = element; }
public void Move() { this._btnMove = WebElementKeeper.WaitingFor_GetElementWhenIsVisible(this.Driver, By.XPath(cst_Move)); if (this._btnMove == null) { throw new Exception(string.Format("Move button with xpath '{0}' is not available", cst_Move)); } this._btnMove.Click(); }
/// <summary> /// Sign In for Dashboard /// </summary> /// <param name="userName">User name</param> /// <param name="password">Password</param> /// <param name="churchCode">Church code</param> public void Action_SignIn() { this.txtUserName.Clear(); this.txtPassword.Clear(); this.btnSignIn.Click(); //Wait for refreshing WebElementKeeper.WaitingFor_InvisibilityOfElementLocated(this.Driver, By.XPath(_spinnerXPath)); }
//public void ChangeRosterStatus () //{ // var element = WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(cst_Toggle)); // if (element == null) // { // throw new Exception(string.Format("Element with XPath '{0}' does not exit", cst_Toggle)); // } // this.toggle.Click(); //} public void Next() { this.btnNext = WebElementKeeper.WaitingFor_GetElementWhenIsVisible(this.Driver, By.XPath(cst_Next)); if (this.btnNext == null) { throw new Exception(string.Format("Next button with xpath '{0}' is not available", cst_Next)); } this.btnNext.Click(); }
public void Action_PwdSendEmail(string email) { this.txtEmail.Clear(); this.txtEmail.SendKeys(email); this.btnRestPwd.Click(); //Wait for refreshing WebElementKeeper.WaitingFor_InvisibilityOfElementLocated(this.Driver, By.XPath(_spinnerXPath)); }
/// <summary> /// Check error message is 'expectedErrorMsg'. /// </summary> /// <param name="expectedErrorMsg">expected error message.</param> /// <returns>is verify success</returns> public bool Check_ErrorMessage(string expectedErrorMsg) { var verifyErrorMsg = false; var hasErrorMsg = WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(_errorMsgXPath)); if (!hasErrorMsg && !txtErrorMsg.Displayed) { return(verifyErrorMsg); } verifyErrorMsg = WebElementKeeper.WaitingFor_TextToBePresentInElement(this.Driver, this.txtErrorMsg, expectedErrorMsg); return(verifyErrorMsg); }
public bool IsErrorMsgExpected(string expectedErrorMsg) { var isExpected = false; WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(_errorMsgXPath)); if (!txtErrorMsg.Displayed) { return(isExpected); } isExpected = WebElementKeeper.WaitingFor_TextToBePresentInElement(this.Driver, this.txtErrorMsg, expectedErrorMsg); return(isExpected); }
public void Action_SignUp(string firstName, string lastName, string email, string signUpPwd, string confirmPwd) { this.txtFirstname.Clear(); this.txtLastname.Clear(); this.txtEmail.Clear(); this.txtSignUpPassword.Clear(); this.txtConfirmPassword.Click(); this.txtFirstname.SendKeys(firstName); this.txtLastname.SendKeys(lastName); this.txtEmail.SendKeys(email); this.txtSignUpPassword.SendKeys(signUpPwd); this.txtConfirmPassword.SendKeys(confirmPwd); this.btnSignUp.Click(); //Wait for refreshing WebElementKeeper.WaitingFor_InvisibilityOfElementLocated(this.Driver, By.XPath(_spinnerXPath)); }
public void SetBaseProfile(string firstName, string lastName, string street1, string city, string zipcode) { WebElementKeeper.WaitingFor_InvisibilityOfElementLocated(this.Driver, By.XPath(_spinnerXPath)); this.txtFirstname.Clear(); this.txtLastname.Clear(); this.txtStreet1.Clear(); this.txtCity.Clear(); this.txtZipcode.Clear(); this.txtFirstname.SendKeys(firstName); this.txtLastname.SendKeys(lastName); this.txtStreet1.SendKeys(street1); this.txtCity.SendKeys(city); this.txtZipcode.SendKeys(zipcode); this.btnSave.Click(); //Wait for refreshing WebElementKeeper.WaitingFor_InvisibilityOfElementLocated(this.Driver, By.XPath(_spinnerXPath)); }
/// <summary> /// Action for select start day of week. /// </summary> /// <param name="view">enum for DayOfWeek type</param> public void Action_SelectStartDayOfWeek(DayOfWeek startDay) { string waitElement = string.Empty; switch (startDay) { case DayOfWeek.Sunday: this.btnWeekDay_Sunday.Click(); break; case DayOfWeek.Monday: this.btnWeekDay_Monday.Click(); break; case DayOfWeek.Tuesday: this.btnWeekDay_Tuesday.Click(); break; case DayOfWeek.Wednesday: this.btnWeekDay_Wednesday.Click(); break; case DayOfWeek.Thursday: this.btnWeekDay_Thursday.Click(); break; case DayOfWeek.Friday: this.btnWeekDay_Friday.Click(); break; case DayOfWeek.Saturday: this.btnWeekDay_Saturday.Click(); break; default: return; } WebElementKeeper.WaitingFor_InvisibilityOfElementLocated(this._driver, By.XPath(cst_ProgressBar)); System.Threading.Thread.Sleep(TimeSpan.FromSeconds(5)); }
public LaunchpadSignInPage(IWebDriver driver) : base(driver) { WebElementKeeper.WaitingFor_ElementExists(this.Driver, By.Id("username")); }
public void Action_SignInSuccess(string userName, string password) { Action_SignIn(userName, password); WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(_infellowshipAppIcon)); }
public Link(WebElementKeeper elementKeeper) : base(elementKeeper) { }
public DefaultElement(WebElementKeeper elementKeeper) : base(elementKeeper) { }
public CoordinatorActivityInstancePage(IWebDriver driver) : base(driver) { WebElementKeeper.WaitingFor_ElementExists(this.Driver, By.XPath(".//button[text()='Start']")); }
public MoveHomePage(IWebDriver driver) : base(driver) { WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(".//classroom-list/ul/li/ul/li[text()='Roster Grouping']")); }
public void SetBaseProfileSuccessfully(string firstName, string lastName, string street1, string city, string zipcode) { SetBaseProfile(firstName, lastName, street1, city, zipcode); WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(_msgSuccess)); }
public CoordinatorRegisterDevicePage(IWebDriver driver) : base(driver) { WebElementKeeper.WaitingFor_ElementExists(this.Driver, By.XPath(".//input[@placeholder='Username']")); }
public Option(WebElementKeeper elementKeeper) : base(elementKeeper) { }
public Select(WebElementKeeper elementKeeper) : base(elementKeeper) { }
public ProfilePage(IWebDriver driver) : base(driver) { WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(".//input[@placeholder='First name']")); }
public Button(WebElementKeeper elementKeeper) : base(elementKeeper) { }
protected void WaitingForItemPanelStateChange() { var headerXPath = string.Format(cst_ItemPanelXPathTemp, _rootXPath); WebElementKeeper.WaitingFor_ElementExists(this._driver, By.XPath(headerXPath)); }
public PasswordPage(IWebDriver driver) : base(driver) { WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(".//input[@placeholder='Current password']")); }
public Contaner(WebElementKeeper elementKeeper) : base(elementKeeper) { }
public Text(WebElementKeeper element) : base(element) { }
public CoordinatorActivityCodePage(IWebDriver driver) : base(driver) { WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(".//h2[text()='Enter four digit activity code here']")); }