Ejemplo n.º 1
0
        public void ContactModificationTest()
        {
            long        timestamp = System.Diagnostics.Stopwatch.GetTimestamp();
            ContactData contact   = new ContactData()
            {
                Lastname  = "lastname" + timestamp,
                Firstname = "firstname" + timestamp
            };

            app.Nav.GoToContactsPage();

            List <ContactData> oldContacts = app.Contact.GetContactsList();

            app.Contact.EditContact(0, contact);
            Assert.AreEqual(oldContacts.Count, app.Contact.GetContactsCount());

            List <ContactData> newContacts = app.Contact.GetContactsList();

            newContacts.Sort();
            contact.ContactId = newContacts.Find(c => (c.Lastname == contact.Lastname)).ContactId;
            oldContacts[0]    = contact;
            oldContacts.Sort();
            Assert.AreEqual(oldContacts, newContacts);
        }
 private ContactHelper Select(ContactData contact)
 {
     driver.FindElement(By.XPath($"//input[@value='{contact.Id}']")).Click();
     return(this);
 }
 public ContactHelper InitModification(ContactData contact)
 {
     driver.FindElement(By.XPath($"//a[contains(@href, 'edit.php?id={contact.Id}')]")).Click();
     return(this);
 }