Exemple #1
0
        public void TestdeleteContactFromGroups()
        {
            app.Contacts.ContactsProv();
            app.Groups.GroupProv();

            GroupData           group   = GroupData.GetAllGroup()[0];
            List <ContactsData> oldList = group.GetContacts();
            ContactsData        contact = ContactsData.GetAllContact().First();

            if (group.GetContacts().Count() == 0)
            {
                app.Contacts.AddContactToGroup(contact, group);
            }
            app.Contacts.DeleteContactFromFroup(contact, group);

            List <ContactsData> newList = group.GetContacts();

            oldList.Add(contact);
            newList.Sort();
            oldList.Sort();

            Assert.AreNotEqual(oldList, newList);
        }
Exemple #2
0
        public ContactHelper FillContactForm(ContactsData contactsData)
        {
            Type(By.Name("firstname"), contactsData.FirstName);
            Type(By.Name("middlename"), contactsData.MiddleName);
            Type(By.Name("lastname"), contactsData.LastName);
            Type(By.Name("nickname"), contactsData.Nickname);
            Type(By.Name("title"), contactsData.Title);
            Type(By.Name("company"), contactsData.Company);
            Type(By.Name("address"), contactsData.Address);
            Type(By.Name("home"), contactsData.Home);
            Type(By.Name("mobile"), contactsData.Mobile);
            Type(By.Name("work"), contactsData.Work);
            Type(By.Name("fax"), contactsData.Fax);
            Type(By.Name("email"), contactsData.Email);
            Type(By.Name("email2"), contactsData.Email2);
            Type(By.Name("email3"), contactsData.Email3);
            Type(By.Name("homepage"), contactsData.Homepage);
            driver.FindElement(By.Name("bday")).Click();
            new SelectElement(driver.FindElement(By.Name("bday"))).SelectByText(contactsData.BDay);
            driver.FindElement(By.Name("bday")).Click();
            driver.FindElement(By.Name("bmonth")).Click();
            new SelectElement(driver.FindElement(By.Name("bmonth"))).SelectByText(contactsData.BMonth);
            driver.FindElement(By.Name("bmonth")).Click();
            Type(By.Name("byear"), contactsData.BYear);
            driver.FindElement(By.Name("aday")).Click();
            new SelectElement(driver.FindElement(By.Name("aday"))).SelectByText(contactsData.ADay);
            driver.FindElement(By.Name("aday")).Click();
            driver.FindElement(By.Name("amonth")).Click();
            new SelectElement(driver.FindElement(By.Name("amonth"))).SelectByText(contactsData.AMonth);
            driver.FindElement(By.Name("amonth")).Click();
            Type(By.Name("ayear"), contactsData.AYear);
            Type(By.Name("address2"), contactsData.SAddress);
            Type(By.Name("phone2"), contactsData.SHome);
            Type(By.Name("notes"), contactsData.SNotes);

            return(this);
        }
Exemple #3
0
        public void ContactCreationTest()
        {
            ContactsData contactsData = new ContactsData("a", "admin", "secret");

            contactsData.MiddleName = "a";
            contactsData.LastName   = "a";
            contactsData.Nickname   = "a";
            contactsData.Company    = "a";
            contactsData.Title      = "a";
            contactsData.Address    = "a";
            contactsData.Home       = "a";
            contactsData.Mobile     = "a";
            contactsData.Work       = "a";
            contactsData.Fax        = "a";
            contactsData.Email      = "a";
            contactsData.Email2     = "a";
            contactsData.Email3     = "a";
            contactsData.Homepage   = "a";
            contactsData.BDay       = "28";
            contactsData.BMonth     = "April";
            contactsData.BYear      = "2000";
            contactsData.ADay       = "12";
            contactsData.AMonth     = "January";
            contactsData.AYear      = "2000";
            contactsData.SAddress   = "a";
            contactsData.SHome      = "a";
            contactsData.SNotes     = "a";


            app.Groups
            .InitNewContactCreation()
            .FillContactForm(contactsData)
            .SubmitContactCreatin();
            app.Navigator.GoToHomePage();
            app.AuthOut.Logout();
        }