diff options
author | Robert Sloan <varomodt@google.com> | 2016-09-13 19:23:32 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-09-13 19:23:33 +0000 |
commit | f9f798a51f9f436bddbe4ac6b3a9459f01bf3162 (patch) | |
tree | 6ed4d837eacdc919d2b241ced8fb6809e19d1d22 | |
parent | 4cc9bf1a50f65c5f2b5b81cec185ea4d249c54fc (diff) | |
parent | ce8b31d331dd392c2377b8a3c76d45a8457cd808 (diff) | |
download | platform_testing-f9f798a51f9f436bddbe4ac6b3a9459f01bf3162.tar.gz |
Merge "Add testing facilities for traversing Gmail message bodies to derive links." into nyc-mr1-dev
-rw-r--r-- | libraries/base-app-helpers/src/android/platform/test/helpers/AbstractGmailHelper.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libraries/base-app-helpers/src/android/platform/test/helpers/AbstractGmailHelper.java b/libraries/base-app-helpers/src/android/platform/test/helpers/AbstractGmailHelper.java index ce368184f..5f4b52fb3 100644 --- a/libraries/base-app-helpers/src/android/platform/test/helpers/AbstractGmailHelper.java +++ b/libraries/base-app-helpers/src/android/platform/test/helpers/AbstractGmailHelper.java @@ -19,6 +19,8 @@ package android.platform.test.helpers; import android.app.Instrumentation; import android.support.test.uiautomator.Direction; +import java.util.List; + public abstract class AbstractGmailHelper extends AbstractStandardAppHelper { public AbstractGmailHelper(Instrumentation instr) { @@ -193,4 +195,23 @@ public abstract class AbstractGmailHelper extends AbstractStandardAppHelper { * @param index The index of the attachment to download */ public abstract void downloadAttachment(int index); + + /** + * Setup expectations: Gmail is open and an email is open. + * + * This method gets every link target in an open email by traversing the UI tree of the body + * of the open message. + * + * @return an iterator over the links in the message + */ + public abstract List<String> getEmailLinks(); + + /** + * Setup expectations: Gmail is open and an email is open. + * + * This method clicks the link in the open email with the given target. + * + * @param target the target of the link to click + */ + public abstract void openEmailLink(String target); } |