示例#1
0
 public ContactHelper fillContactForm(ContactData contact, boolean formType) {
   type(By.name("firstname"), contact.getFname());
   type(By.name("lastname"), contact.getLname());
   type(By.name("address"), contact.getAddress1());
   type(By.name("home"), contact.getHnumber());
   type(By.name("mobile"), contact.getMnumber());
   type(By.name("work"), contact.getWnumber());
   type(By.name("email"), contact.getMail1());
   type(By.name("email2"), contact.getMail2());
   type(By.name("byear"), contact.getYear());
   if (formType == CREATION) {
   } else {
     if (driver.findElements(By.name("new_group")).size() != 0) {
       throw new Error("Group selector exists in contact modification form");
     }
   }
   type(By.name("address2"), contact.getAddress2());
   type(By.name("phone2"), contact.getPhonenumber());
   return this;
 }