示例#1
0
 /// <summary>
 /// clears all available text fields
 /// </summary>
 private void ClearTextFields()
 {
     Title_text.Clear();
     Author_text.Clear();
     ISBN_text.Clear();
     Price_text.Clear();
 }
示例#2
0
        //Methods:

        public void CreateNewUser(string emailaddress, string firstName, log4net.ILog log)
        {
            //Create an instance of the LAFAdmin_ManageUsers_Page
            //I will just call this instance 'usersPage' for short:
            log.Info("Test Start: CreateNewUser, username="******"Mr");
            First_Name_text.SendKeys(firstName);
            Last_Name_text.SendKeys("Test");
            Country_of_Residence_dropdown.SendKeys("United Kingdom");
            Contact_Telephone_Number_text.SendKeys("123");
            Are_you_an_insurance_professional_dropdown.SendKeys("No");
            Job_title_text.SendKeys("Tester");
            Company_name_text.SendKeys("Testing LTD");
            Organisation_type_dropdown.SendKeys("Lloyds corporation");

            Save_link.Click();

            //Assertion:

            Email_Address_Text.SendKeys(emailaddress);
            Search_link.Click();
            Assert.IsTrue(SEARCH_RESULTS_links.Displayed);

            log.Info("New User Created Successfully");


            try
            {
                USERS_link.Click();
            }
            catch
            {
                PageFactory.InitElements(driver, this);
                USERS_link.Click();
            }
        }