Exemple #1
0
 public ContactHelper FillContactForm(ContactData contact)
 {
     Type(By.Name("firstname"), contact.Firstname);
     Type(By.Name("lastname"), contact.Lastname);
     return(this);
 }
 public void FillContactForm(ContactData contact)
 {
     Type(By.Name("firstname"), contact.Firstname);
     Type(By.Name("middlename"), contact.Middlename);
     Type(By.Name("lastname"), contact.Lastname);
 }
 public void FillContactFields(ContactData contact)
 {
     Type(By.Name("firstname"), contact.FirstName);
     Type(By.Name("lastname"), contact.LastName);
 }
Exemple #4
0
 public void Create(ContactData contact)
 {
     InitiateContactCreation();
     FillContactForms(contact);
 }
        public void ContactDetailsTest()
        {
            ContactData   dataFromEditTable = applicationManager.ContactsHelper.GetContactContentFromEditForm(1);
            string        dataFromDetails   = applicationManager.ContactsHelper.GetContactContentFromDetails(1);
            StringBuilder formattedString   = new StringBuilder();

            if (dataFromEditTable.FirstName != "")
            {
                formattedString.Append(dataFromEditTable.FirstName + " ");
            }

            if (dataFromEditTable.MiddleName != "")
            {
                formattedString.Append(dataFromEditTable.MiddleName + " ");
            }

            if (dataFromEditTable.LastName != "")
            {
                formattedString.Append(dataFromEditTable.LastName + "\r\n");
            }

            if (dataFromEditTable.Nickname != "")
            {
                formattedString.Append(dataFromEditTable.Nickname + "\r\n");
            }

            if (dataFromEditTable.Title != "")
            {
                formattedString.Append(dataFromEditTable.Title + "\r\n");
            }

            if (dataFromEditTable.Company != "")
            {
                formattedString.Append(dataFromEditTable.Company + "\r\n");
            }

            if (dataFromEditTable.Address != "")
            {
                formattedString.Append(dataFromEditTable.Address + "\r\n\r\n");
            }

            if (dataFromEditTable.HomePhone != "")
            {
                formattedString.Append("H: " + dataFromEditTable.HomePhone + "\r\n");
            }

            if (dataFromEditTable.MobilePhone != "")
            {
                formattedString.Append("M: " + dataFromEditTable.MobilePhone + "\r\n");
            }

            if (dataFromEditTable.WorkPhone != "")
            {
                formattedString.Append("W: " + dataFromEditTable.WorkPhone + "\r\n");
            }

            if (dataFromEditTable.Fax != "")
            {
                formattedString.Append("F: " + dataFromEditTable.Fax + "\r\n\r\n");
            }

            if (dataFromEditTable.Email1 != "")
            {
                formattedString.Append(dataFromEditTable.Email1 + "\r\n");
            }

            if (dataFromEditTable.Email2 != "")
            {
                formattedString.Append(dataFromEditTable.Email2 + "\r\n");
            }

            if (dataFromEditTable.Email3 != "")
            {
                formattedString.Append(dataFromEditTable.Email3 + "\r\n");
            }

            if (dataFromEditTable.Homepage != "")
            {
                formattedString.Append("Homepage:" + "\r\n" + dataFromEditTable.Homepage + "\r\n\r\n\r\n");
            }

            if (dataFromEditTable.SecondaryAddress != "")
            {
                formattedString.Append(dataFromEditTable.SecondaryAddress + "\r\n\r\n");
            }

            if (dataFromEditTable.Home != "")
            {
                formattedString.Append("P: " + dataFromEditTable.Home + "\r\n\r\n");
            }

            if (dataFromEditTable.Notes != "")
            {
                formattedString.Append(dataFromEditTable.Notes);
            }

            Assert.AreEqual(dataFromDetails, formattedString.ToString());
        }