Пример #1
0
        /// <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));
        }
Пример #2
0
 protected BaseElement(WebElementKeeper element)
 {
     if (element == null)
     {
         throw new ArgumentNullException();
     }
     this.element = element;
 }
Пример #3
0
 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();
 }
Пример #4
0
        /// <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));
        }
Пример #5
0
        //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();
        }
Пример #6
0
        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));
        }
Пример #7
0
        /// <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);
        }
Пример #8
0
        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);
        }
Пример #9
0
        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));
        }
Пример #10
0
        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));
        }
Пример #11
0
        /// <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));
        }
Пример #12
0
 public LaunchpadSignInPage(IWebDriver driver)
     : base(driver)
 {
     WebElementKeeper.WaitingFor_ElementExists(this.Driver, By.Id("username"));
 }
Пример #13
0
 public void Action_SignInSuccess(string userName, string password)
 {
     Action_SignIn(userName, password);
     WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(_infellowshipAppIcon));
 }
Пример #14
0
 public Link(WebElementKeeper elementKeeper) : base(elementKeeper)
 {
 }
 public DefaultElement(WebElementKeeper elementKeeper) : base(elementKeeper)
 {
 }
Пример #16
0
 public CoordinatorActivityInstancePage(IWebDriver driver) : base(driver)
 {
     WebElementKeeper.WaitingFor_ElementExists(this.Driver, By.XPath(".//button[text()='Start']"));
 }
Пример #17
0
 public MoveHomePage(IWebDriver driver)
     : base(driver)
 {
     WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(".//classroom-list/ul/li/ul/li[text()='Roster Grouping']"));
 }
Пример #18
0
 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));
 }
Пример #19
0
 public CoordinatorRegisterDevicePage(IWebDriver driver)
     : base(driver)
 {
     WebElementKeeper.WaitingFor_ElementExists(this.Driver, By.XPath(".//input[@placeholder='Username']"));
 }
Пример #20
0
 public Option(WebElementKeeper elementKeeper) : base(elementKeeper)
 {
 }
Пример #21
0
 public Select(WebElementKeeper elementKeeper) : base(elementKeeper)
 {
 }
Пример #22
0
 public ProfilePage(IWebDriver driver)
     : base(driver)
 {
     WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(".//input[@placeholder='First name']"));
 }
Пример #23
0
 public Button(WebElementKeeper elementKeeper) : base(elementKeeper)
 {
 }
Пример #24
0
        protected void WaitingForItemPanelStateChange()
        {
            var headerXPath = string.Format(cst_ItemPanelXPathTemp, _rootXPath);

            WebElementKeeper.WaitingFor_ElementExists(this._driver, By.XPath(headerXPath));
        }
Пример #25
0
 public PasswordPage(IWebDriver driver) : base(driver)
 {
     WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(".//input[@placeholder='Current password']"));
 }
Пример #26
0
 public Contaner(WebElementKeeper elementKeeper) : base(elementKeeper)
 {
 }
Пример #27
0
 public Text(WebElementKeeper element) : base(element)
 {
 }
Пример #28
0
 public CoordinatorActivityCodePage(IWebDriver driver) : base(driver)
 {
     WebElementKeeper.WaitingFor_ElementIsVisible(this.Driver, By.XPath(".//h2[text()='Enter four digit activity code here']"));
 }