mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-13 22:28:36 +00:00
Merge pull request #33 from jimboatarm/gmail_cleanup
Remove redundant clickUiObject method
This commit is contained in:
commit
da00367d74
Binary file not shown.
Binary file not shown.
@ -143,12 +143,6 @@ public class BaseUiAutomation extends UiAutomatorTestCase {
|
||||
return object;
|
||||
}
|
||||
|
||||
public void clickUiObject(UiObject uiobject, long timeout) throws Exception {
|
||||
if (!uiobject.clickAndWaitForNewWindow(timeout)) {
|
||||
throw new UiObjectNotFoundException(String.format("Timeout waiting for New Window"));
|
||||
}
|
||||
}
|
||||
|
||||
public int getDisplayHeight () {
|
||||
return getUiDevice().getInstance().getDisplayHeight();
|
||||
}
|
||||
|
Binary file not shown.
@ -58,12 +58,12 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
UiObject gotItBox = new UiObject(new UiSelector().resourceId("com.google.android.gm:id/welcome_tour_got_it")
|
||||
.className("android.widget.TextView"));
|
||||
if (gotItBox.exists()) {
|
||||
clickUiObject(gotItBox, timeout);
|
||||
gotItBox.clickAndWaitForNewWindow(timeout);
|
||||
}
|
||||
UiObject takeMeToBox = new UiObject(new UiSelector().textContains("Take me to Gmail")
|
||||
.className("android.widget.TextView"));
|
||||
if (takeMeToBox.exists()) {
|
||||
clickUiObject(takeMeToBox, timeout);
|
||||
takeMeToBox.clickAndWaitForNewWindow(timeout);
|
||||
}
|
||||
|
||||
UiObject syncNowButton = new UiObject(new UiSelector().textContains("Sync now")
|
||||
@ -89,7 +89,7 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
Timer result = new Timer();
|
||||
UiObject newMailButton = getUiObjectByDescription("Compose", "android.widget.ImageButton");
|
||||
result.start();
|
||||
clickUiObject(newMailButton, timeout);
|
||||
newMailButton.clickAndWaitForNewWindow(timeout);
|
||||
result.end();
|
||||
timingResults.put("Create_newMail", result);
|
||||
}
|
||||
@ -136,7 +136,7 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
Timer result = new Timer();
|
||||
UiObject sendButton = getUiObjectByDescription("Send", "android.widget.TextView");
|
||||
result.start();
|
||||
clickUiObject(sendButton, timeout);
|
||||
sendButton.clickAndWaitForNewWindow(timeout);
|
||||
result.end();
|
||||
timingResults.put("Create_Send", result);
|
||||
|
||||
@ -153,9 +153,9 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
Timer result = new Timer();
|
||||
result.start();
|
||||
|
||||
clickUiObject(attachIcon, timeout);
|
||||
attachIcon.click();
|
||||
UiObject attachFile = getUiObjectByText("Attach file", "android.widget.TextView");
|
||||
clickUiObject(attachFile, timeout);
|
||||
attachFile.clickAndWaitForNewWindow(timeout);
|
||||
|
||||
UiObject titleIsWaWorking = new UiObject(new UiSelector()
|
||||
.className("android.widget.TextView")
|
||||
|
Loading…
x
Reference in New Issue
Block a user