コード例 #1
0
        public IWebElement SurveyEmail(string email)
        {
            //select our drop-down and enters a parkcode
            SelectElement ParkSelector = new SelectElement(chromeDriver.FindElement(By.Id("ParkCode")));

            ParkSelector.SelectByValue("CVNP");

            //type an email for us and then clears any older entries then send email brought in and types it in SendKeys(email)
            WaitForElement(By.Id("EmailAddress"));
            EmailBox.Clear();
            EmailBox.SendKeys(email);

            //select from a drop down menu
            SelectElement StateSelector = new SelectElement(chromeDriver.FindElement(By.Id("State")));

            StateSelector.SelectByValue("OH");

            //select radio butons
            IList <IWebElement> radioSelect = chromeDriver.FindElements(By.Id("ActivityLevel"));

            radioSelect[0].Click();

            WaitForElement(By.Id("submit"));
            SubmitButton.Click();

            WaitForElement(By.Id("survey"));
            return(Survey);
        }
コード例 #2
0
        public TestBlankFormPage ClickSubmitButton()
        {
            CustomTestContext.WriteLine("Click submit button");
            SubmitButton.Click();

            return(this);
        }
コード例 #3
0
 public void Submit()
 {
     SubmitButton.Hover();
     SubmitButton.Hover();
     SubmitButton.Click();
     WaitForThrobber();
 }
コード例 #4
0
 public void SetLoginData(string company, string login, string pass)
 {
     CompanyNameInput.SendKeys(company);
     LoginInput.SendKeys(login);
     PasswordInput.SendKeys(pass);
     SubmitButton.Click();
 }
コード例 #5
0
        public void LoginIntoApplication(UserDto user)
        {
            //EmailFieldTextBox.SendKeys(user.userEmail);
            //PasswordFieldTextBox.SendKeys(user.userPassword);

            //var validUser = user.GetValidUser();
            //var userRuntimeProperties = user.GetType().GetRuntimeProperties(); //returns a collection
            //var userProperties = user.GetType().GetProperties(); //returns an array

            var emailValue = user.GetType().GetRuntimeProperty("userEmail").GetValue(user);

            if (emailValue != null)
            {
                EmailFieldTextBox.SendKeys(emailValue.ToString());
            }

            var passwordValue = user.GetType().GetRuntimeProperty("userPassword").GetValue(user);

            if (passwordValue != null)
            {
                PasswordFieldTextBox.SendKeys(passwordValue.ToString());
            }

            SubmitButton.Click();
        }
コード例 #6
0
        public bool RegisterUser(string firtsName, string lastName)
        {
            try
            {
                SetFirstName(firtsName);
                SetLastName(lastName);
                SetRandomHobby();
                SetRandomPhoneNo();
                SetRandomUserName();
                SetRandomEmailAddress();
                SetRandomPassword();
                PasswordStrength.Click();

                if (Helpers.DriverHelper.ElementExist(@"//*[@class='legend error']"))
                {
                    return(false);
                }

                SubmitButton.Click();

                return(Helpers.DriverHelper.ElementExist(@"//*[@class='piereg_message']"));
            }
            catch (Exception)
            {
                return(false);
            }
        }
コード例 #7
0
        public BillingOrderPage ClickSubmitButton()
        {
            CustomTestContext.WriteLine("Click submit button");
            SubmitButton.Click();

            return(new BillingOrderPage(Driver));
        }
コード例 #8
0
        public void SaveEmployee()
        {
            _wait.Until(ExpectedConditions.ElementToBeClickable(SubmitButton));
            SubmitButton.Click();

            Loading();
        }
コード例 #9
0
 public void PerformRequest()
 {
     PasswordField.Clear();
     // sending a single quote is not possible with the Chrome Driver, it sends two single quotes!
     PasswordField.SendKeys("pass'--");
     SubmitButton.Click();
 }
コード例 #10
0
 public void SubmitToSME(string smeName)
 {
     for (int i = 0; i < 5; i++)
     {
         if (AssignToSMEDialog.Element.Exists(new Options()
         {
             Timeout = TimeSpan.FromSeconds(3)
         }))
         {
             break;
         }
         SubmitButton.Click(2);
     }
     HpgAssert.True(AssignToSMEDialog.Element.Exists(), "Assign To SME dialog is present");
     SMEDropDown.SelectListOptionByText(smeName);
     AssignToSMESubmit.Click(3);
     for (int i = 0; i < 5; i++)
     {
         if (AssignToSMEDialog.Element.Missing(new Options()
         {
             Timeout = TimeSpan.FromSeconds(3)
         }))
         {
             break;
         }
         AssignToSMESubmit.Click(3);
     }
     HpgAssert.True(AssignToSMEDialog.Element.Missing(new Options()
     {
         Timeout = TimeSpan.FromSeconds(3)
     }), "Assign to SME dialog is no longer present");
 }
コード例 #11
0
        public void FillRegistrationForm(RegistrationUser user)
        {
            Type(FirstName, user.FirstName);
            Type(LastName, user.LastName);
            ClickOnElements(MartialStatus, user.MatrialStatus);
            ClickOnElements(Hobbys, user.Hobbys);
            CountryOption.SelectByText(user.Country);
            MounthOption.SelectByText(user.BirthMonth);
            DayOption.SelectByText(user.BirthDay);
            YearOption.SelectByText(user.BirthYear);
            Type(Phone, user.Phone);
            Type(UserName, user.UserName);
            Type(Email, user.Email);

            if (user.Picture != null || user.Picture != string.Empty)
            {
                UploadButton.Click();
                Driver.SwitchTo().ActiveElement().SendKeys(user.Picture);
            }

            Type(Description, user.Description);
            Type(Password, user.Password);
            Type(ConfirmPassword, user.ConfirmPassword);
            SubmitButton.Click();
        }
コード例 #12
0
 private void _I_submit_answers()
 {
     FillInText(Answer1, answer1);
     FillInText(Answer2, answer2);
     FillInText(Answer3, answer3);
     FillInText(Name, "Tanya");
     SubmitButton.Click();
 }
コード例 #13
0
        public ultimateQAHomePage FillOutFormAndSubmit(TestUser user)
        {
            FirstNameField.SendKeys(user.firstName);
            LastNameField.SendKeys(user.lastName);
            SubmitButton.Click();

            return(new ultimateQAHomePage(Driver));
        }
コード例 #14
0
 public MailMainMenu Login(User user)
 {
     LoginField.SendKeys(user.Login);
     SubmitButton.Click();
     PasswordField.SendKeys(user.Password);
     SubmitButton.Click();
     return(new MailMainMenu(driver));
 }
コード例 #15
0
 public void Login(string un, string pw)
 {
     UserNameField.Set(un);
     UserNameField.Clear();
     UserNameField.GetText();
     PassWordField.Set(pw);
     SubmitButton.Click();
 }
コード例 #16
0
        public HelloPage SubmitForm(string name)
        {
            InputField.Clear();
            InputField.SendKeys(name);
            SubmitButton.Click();

            return(new HelloPage(driver));
        }
コード例 #17
0
 public UltimateQAHomePage FillOutFormAndSubmit(TestUser user)
 {
     SetGender(user);
     FirstNameField.SendKeys(user.FirstName);
     LastNameField.SendKeys(user.LastName);
     SubmitButton.Click();
     return(new UltimateQAHomePage(Driver));
 }
コード例 #18
0
 public void Login()
 {
     UserNameField.Set("username");
     UserNameField.Clear();
     UserNameField.GetText();
     PassWordField.Set("password");
     SubmitButton.Click();
 }
コード例 #19
0
        /// <summary>
        /// Clicks the submit button.
        /// </summary>
        /// <returns>The expected <see cref="Homepage"/> that should result from this action.</returns>
        public Homepage ClickSubmit()
        {
            WaitForLoad();

            SubmitButton.Click();

            return(new Homepage(Helper.Homepage.AbsoluteUri, Helper.HomepageTitle));
        }
コード例 #20
0
        public void SendRecoverEmail(string email)
        {
            EmailTextBox.SendKeys(email);
            SubmitButton.Click();
            DriverWait.Until(ExpectedConditions.TextToBePresentInElement(FlashAlert,
                                                                         "An email was sent to you to reset your password."));

            Thread.Sleep(10000);
        }
コード例 #21
0
        public void LoginAs(string Practioner)
        {
            LaunchButton.Click();
            SelectElement s = new SelectElement(SelectPractionerDropDown);

            s.SelectByText(Practioner);
            SubmitButton.Click();
            Assert.True(PatientTextBox.Displayed);
        }
コード例 #22
0
        public void TryToSubmit(decimal depositRequestAmount)
        {
            var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(45));

            wait.Until(x => _driver.FindElementWait(By.XPath("//span[text()='Offline Deposit Request']")));

            Amount.SendKeys(depositRequestAmount.ToString(CultureInfo.InvariantCulture));
            _driver.ScrollPage(0, 800);
            SubmitButton.Click();
        }
コード例 #23
0
 public void PopulateSignUpPage()
 {
     Nume.SendKeys("John Miller");
     Email.SendKeys("*****@*****.**");
     Telefon.SendKeys("0712345678");
     Adresa.SendKeys("Brasov, Str. 13 Dec");
     Parola.SendKeys("pwd123");
     ConfirmareParola.SendKeys("pwd123");
     SubmitButton.Click();
 }
コード例 #24
0
 public void Question(string textToEnter, string name, string email, string age, string postcode)
 {
     QuestionLink.Click();
     QuestionField.Click();
     QuestionField1.SendKeys(textToEnter);
     Name.SendKeys(name);
     Email.SendKeys(email);
     Age.SendKeys(age);
     Postcode.SendKeys(postcode);
     SubmitButton.Click();
 }
コード例 #25
0
        public SurveyResult SubmitWithValidData_ReturnResultsPage()
        {
            Email.SendKeys("*****@*****.**");
            State.SendKeys("ak");
            FavoritePark.SendKeys("Glacier National Park");
            ActivityLevel.SendKeys("Inactive");

            SubmitButton.Click();

            return(new SurveyResult(driver));
        }
コード例 #26
0
        public ultimateQAHomePage FillOutFormAndSubmit2Users(TestUser testUser, TestUser eTestUser)
        {
            FirstNameField.SendKeys(testUser.firstName);
            LastNameField.SendKeys(testUser.lastName);
            eFirstNameField.SendKeys(eTestUser.eFirstName);
            eLastNameField.SendKeys(eTestUser.eLastName);

            SubmitButton.Click();

            return(new ultimateQAHomePage(Driver));
        }
コード例 #27
0
        /// <summary>
        /// Press button on the main page.
        /// </summary>
        /// <param name="buttonName"></param>
        public void PressButton(string buttonName)
        {
            switch (buttonName)
            {
            case "SUBMIT":
                SubmitButton.Click();
                break;

            default:
                break;
            }
        }
コード例 #28
0
        public SubmittedOfflineDepositRequestForm SubmitWithBonus(string bonusName, decimal amount)
        {
            Amount.SendKeys(amount.ToString(CultureInfo.InvariantCulture));
            var bonus = _driver.FindElementWait(By.XPath(string.Format("//span[contains(text(), '{0}')]", bonusName)));

            bonus.Click();
            _driver.ScrollPage(0, 600);
            SubmitButton.Click();
            var tab = new SubmittedOfflineDepositRequestForm(_driver);

            return(tab);
        }
コード例 #29
0
        public bool Auth(string login, bool isPhone)
        {
            LoginButton.Click();
            if (isPhone)
            {
                PhoneTab.Click();
            }
            LoginTextBox.SendKeys(login);
            PassTextBox.SendKeys(TestDataResource.Password);
            SubmitButton.Click();

            return(true);
        }
コード例 #30
0
 private void ClickSubmitButton()
 {
     try
     {
         Logger.InfoFormat("Is Submit Button displayed? {0}", SubmitButton.Displayed);
         SubmitButton.Click();
     }
     catch (Exception e)
     {
         Logger.Error("Error: ", e);
         throw (e);
     }
 }