mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-21 01:59:13 +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;
|
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 () {
|
public int getDisplayHeight () {
|
||||||
return getUiDevice().getInstance().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")
|
UiObject gotItBox = new UiObject(new UiSelector().resourceId("com.google.android.gm:id/welcome_tour_got_it")
|
||||||
.className("android.widget.TextView"));
|
.className("android.widget.TextView"));
|
||||||
if (gotItBox.exists()) {
|
if (gotItBox.exists()) {
|
||||||
clickUiObject(gotItBox, timeout);
|
gotItBox.clickAndWaitForNewWindow(timeout);
|
||||||
}
|
}
|
||||||
UiObject takeMeToBox = new UiObject(new UiSelector().textContains("Take me to Gmail")
|
UiObject takeMeToBox = new UiObject(new UiSelector().textContains("Take me to Gmail")
|
||||||
.className("android.widget.TextView"));
|
.className("android.widget.TextView"));
|
||||||
if (takeMeToBox.exists()) {
|
if (takeMeToBox.exists()) {
|
||||||
clickUiObject(takeMeToBox, timeout);
|
takeMeToBox.clickAndWaitForNewWindow(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
UiObject syncNowButton = new UiObject(new UiSelector().textContains("Sync now")
|
UiObject syncNowButton = new UiObject(new UiSelector().textContains("Sync now")
|
||||||
@ -89,7 +89,7 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
Timer result = new Timer();
|
Timer result = new Timer();
|
||||||
UiObject newMailButton = getUiObjectByDescription("Compose", "android.widget.ImageButton");
|
UiObject newMailButton = getUiObjectByDescription("Compose", "android.widget.ImageButton");
|
||||||
result.start();
|
result.start();
|
||||||
clickUiObject(newMailButton, timeout);
|
newMailButton.clickAndWaitForNewWindow(timeout);
|
||||||
result.end();
|
result.end();
|
||||||
timingResults.put("Create_newMail", result);
|
timingResults.put("Create_newMail", result);
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
Timer result = new Timer();
|
Timer result = new Timer();
|
||||||
UiObject sendButton = getUiObjectByDescription("Send", "android.widget.TextView");
|
UiObject sendButton = getUiObjectByDescription("Send", "android.widget.TextView");
|
||||||
result.start();
|
result.start();
|
||||||
clickUiObject(sendButton, timeout);
|
sendButton.clickAndWaitForNewWindow(timeout);
|
||||||
result.end();
|
result.end();
|
||||||
timingResults.put("Create_Send", result);
|
timingResults.put("Create_Send", result);
|
||||||
|
|
||||||
@ -153,9 +153,9 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
Timer result = new Timer();
|
Timer result = new Timer();
|
||||||
result.start();
|
result.start();
|
||||||
|
|
||||||
clickUiObject(attachIcon, timeout);
|
attachIcon.click();
|
||||||
UiObject attachFile = getUiObjectByText("Attach file", "android.widget.TextView");
|
UiObject attachFile = getUiObjectByText("Attach file", "android.widget.TextView");
|
||||||
clickUiObject(attachFile, timeout);
|
attachFile.clickAndWaitForNewWindow(timeout);
|
||||||
|
|
||||||
UiObject titleIsWaWorking = new UiObject(new UiSelector()
|
UiObject titleIsWaWorking = new UiObject(new UiSelector()
|
||||||
.className("android.widget.TextView")
|
.className("android.widget.TextView")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user