public void FillRegisterForm()
        {
            //Wait for Filling form
            WebDriverWait wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(20));

            wait.Until(pageLoaded => pageLoaded.FindElement(By.CssSelector(".std.box")).Displayed);

            //Fill the form
            GenderCheckboxLocator.Click();
            FirstNameLocator.SendKeys(firstName);
            LastNameLocator.SendKeys(lastName);
            PasswordField.SendKeys(password);
            Address1Field.SendKeys(street);
            CityField.SendKeys(city);
            PostcodeField.SendKeys(postalCode);
            MobilePhoneField.SendKeys(mobilePhone);

            //Clear the last field and send new text
            IWebElement myAddress = _driver.FindElement(By.Id("alias"));

            myAddress.Clear();
            myAddress.SendKeys("My address");

            //Select from the dropdown list
            IWebElement   element = StateDropdown;
            SelectElement select  = new SelectElement(element);

            select.SelectByText("Alabama");

            //Click Submitt Account
            SubmitAccountBtn.Click();
        }
Exemplo n.º 2
0
            public void Step3()
            {
                var d = new Data.Data.Beneficiary();

                var DOBYearDropdownSelect  = new SelectElement(DobYearDropdown);
                var DOBMonthDropdownSelect = new SelectElement(DobMonthDropdown);
                var DOBDayDropdownSelect   = new SelectElement(DobDayDropdown);
                var StateDropdownSelect    = new SelectElement(StateDropDown);


                FirstNameField.SendKeys(d.FirstName);
                LastNameField.SendKeys(d.LastName);
                SSNField.SendKeys(d.SSN);
                DOBYearDropdownSelect.SelectByText(d.Year);
                DOBMonthDropdownSelect.SelectByText(d.Month);
                DOBDayDropdownSelect.SelectByText(d.Day);
                SSNField.Click();
                Actions builder = new Actions(_driver);

                builder.SendKeys(Keys.Tab).Perform();
                var AgeGradeDropdownSelect = new SelectElement(AgeGradeDropdown);

                AgeGradeDropdownSelect.SelectByIndex(d.AgeGrade);
                Address1Field.SendKeys(d.Address1);
                CityField.SendKeys(d.City);
                StateDropdownSelect.SelectByText(d.State);
                ZipCodeField.SendKeys(d.Zip);
                NextButton.Click();
            }
Exemplo n.º 3
0
            public void Step2()
            {
                var d = new Data.Data.AccountOwner();
                var SalutationDropdownSelect = new SelectElement(SalutationDropdown);
                var DOBYearDropdownSelect    = new SelectElement(DobYearDropdown);
                var DOBMonthDropdownSelect   = new SelectElement(DobMonthDropdown);
                var DOBDayDropdownSelect     = new SelectElement(DobDayDropdown);
                var StateDropdownSelect      = new SelectElement(StateDropDown);

                SalutationDropdownSelect.SelectByText(d.Salutation);
                FirstNameField.SendKeys(d.FirstName);
                LastNameField.SendKeys(d.LastName);
                SSNField.SendKeys(d.SSN);
                DOBYearDropdownSelect.SelectByText(d.Year);
                DOBMonthDropdownSelect.SelectByText(d.Month);
                DOBDayDropdownSelect.SelectByText(d.Day);
                Address1Field.SendKeys(d.Address1);
                CityField.SendKeys(d.City);
                StateDropdownSelect.SelectByText(d.State);
                ZipCodeField.SendKeys(d.Zip);
                PhoneNumberField.SendKeys(d.PhoneNum);
                CellRadio.Click();
                NextButton.Click();
            }
Exemplo n.º 4
0
 public void SetRegisterAddress1Field(string text)
 {
     Address1Field.SendKeys(text);
 }