use of com.owncloud.android.test.ui.models.RemoveConfirmationView in project android by owncloud.
the class Actions method deleteElement.
public static AndroidElement deleteElement(String elementName, FileListView fileListView, AndroidDriver driver) throws Exception {
AndroidElement fileElement;
WaitAMomentPopUp waitAMomentPopUp;
try {
//To open directly the "file list view" and
//we don't need to know in which view we are
driver.startActivity("com.owncloud.android", ".ui.activity.FileDisplayActivity");
fileElement = (AndroidElement) driver.findElementByName(elementName);
ElementMenuOptions menuOptions = fileListView.longPressOnElement(elementName);
RemoveConfirmationView removeConfirmationView = menuOptions.clickOnRemove();
;
waitAMomentPopUp = removeConfirmationView.clickOnRemoteAndLocalButton();
Common.waitTillElementIsNotPresent(waitAMomentPopUp.getWaitAMomentTextElement(), 100);
} catch (NoSuchElementException e) {
fileElement = null;
}
return fileElement;
}
Aggregations