예제 #1
0
        //Methods

        // Creates a user given a set of details
        public static void CreateUser(string firstname, string lastname, string startdate, string email)
        {
            //Wait for First Name Box
            Helper.WaitForElement(By.XPath("/html/body/div/div/div/form/fieldset/label[1]/input"));
            //Enter First Name
            FirstNameElement.SendKeys(firstname);
            //Enter Last Name
            LastNameElement.SendKeys(lastname);
            //Enter Start Date
            StartDateElement.SendKeys(startdate);
            //Enter Email Address
            EmailElement.SendKeys(email);
            //Click Create Button
            Setup.cDriver.FindElement(AddButton).Click();
        }
예제 #2
0
        // Methods

        // Edits User to hold new values
        public static void UpdateUser(string firstname, string lastname, string startdate, string email)
        {
            //Wait for Email Box
            Helper.WaitForElement(By.CssSelector("body > div > div > div > form > fieldset > label:nth-child(6) > input"));
            //Enter First Name
            FirstNameElement.Clear();
            FirstNameElement.SendKeys(firstname);
            //Enter Last Name
            LastNameElement.Clear();
            LastNameElement.SendKeys(lastname);
            //Enter Start Date
            StartDateElement.Clear();
            StartDateElement.SendKeys(startdate);
            //Enter Email Address
            EmailElement.Clear();
            EmailElement.SendKeys(email);
            //Click update Button
            Setup.cDriver.FindElement(UpdateButton).Click();
        }
예제 #3
0
 public WhatYouCouldEarnSection EnterEmail(string email)
 {
     EmailElement.SendKeys(email);
     return(this);
 }