Пример #1
0
 public ContactsPage deleteContact(String name) {
   TouchAction action = new TouchAction(wd);
   WebElement contact = getContactFieldByName(name);
   action.longPress(contact).release().perform();
   modalOptionDeleteContact.click();
   btnDeleteDeletePrompt.click();
   return this;
 }
Пример #2
0
  public static void removeWidget(String forms) {

    // TODO; some code to remove forms

    TouchAction action = new TouchAction(Driver.Instance);

    List<WebElement> addedWidgets =
        Driver.Instance.findElements(By.id("com.itelematic.drive.dashboard:id/title"));
    for (WebElement wid : addedWidgets) {
      if (wid.getText().equalsIgnoreCase(forms)) {
        System.out.println(wid);
        action.longPress(wid).release().perform();

        wid.click();
      }
    }
  }