1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-20 17:48:44 +00:00

Merge pull request #13 from jimboatarm/fudge

Fixes for Gmail, Reader and Photos on a particular devicex
This commit is contained in:
McGeagh 2016-05-10 16:23:35 +01:00
commit 493a2de536
4 changed files with 12 additions and 11 deletions

View File

@ -62,7 +62,7 @@ public class UiAutomation extends UxPerfUiAutomation {
result.start(); result.start();
clickUiObject(newMailButton, timeout); clickUiObject(newMailButton, timeout);
result.end(); result.end();
timingResults.put("newMail", result); timingResults.put("Create_newMail", result);
} }
public void setToField() throws Exception { public void setToField() throws Exception {
@ -73,7 +73,7 @@ public class UiAutomation extends UxPerfUiAutomation {
toField.setText(recipient); toField.setText(recipient);
getUiDevice().pressEnter(); getUiDevice().pressEnter();
result.end(); result.end();
timingResults.put("To", result); timingResults.put("Create_To", result);
} }
public void setSubjectField() throws Exception { public void setSubjectField() throws Exception {
@ -85,7 +85,7 @@ public class UiAutomation extends UxPerfUiAutomation {
subjectField.setText("This is a test message"); subjectField.setText("This is a test message");
getUiDevice().pressEnter(); getUiDevice().pressEnter();
result.end(); result.end();
timingResults.put("Subject", result); timingResults.put("Create_Subject", result);
} }
public void setComposeField() throws Exception { public void setComposeField() throws Exception {
@ -95,7 +95,7 @@ public class UiAutomation extends UxPerfUiAutomation {
composeField.setText("This is a test composition"); composeField.setText("This is a test composition");
getUiDevice().pressEnter(); getUiDevice().pressEnter();
result.end(); result.end();
timingResults.put("Compose", result); timingResults.put("Create_Compose", result);
} }
public void clickSendButton() throws Exception { public void clickSendButton() throws Exception {
@ -104,11 +104,9 @@ public class UiAutomation extends UxPerfUiAutomation {
result.start(); result.start();
clickUiObject(sendButton, timeout); clickUiObject(sendButton, timeout);
result.end(); result.end();
timingResults.put("Send", result); timingResults.put("Create_Send", result);
UiObject drawerButton = new UiObject(new UiSelector().descriptionContains("avigat") sendButton.waitUntilGone(networkTimeoutSecs);
.className("android.widget.ImageButton"));
waitObject(drawerButton, networkTimeoutSecs);
} }
public void attachFiles() throws Exception { public void attachFiles() throws Exception {
@ -168,8 +166,8 @@ public class UiAutomation extends UxPerfUiAutomation {
.className("android.widget.GridView") .className("android.widget.GridView")
.childSelector(new UiSelector() .childSelector(new UiSelector()
.index(i).className("android.widget.FrameLayout"))); .index(i).className("android.widget.FrameLayout")));
imageFileButton.click();
clickUiObject(imageFileButton, timeout); imageFileButton.waitUntilGone(timeout);
result.end(); result.end();

View File

@ -28,6 +28,7 @@ public class UiAutomation extends UxPerfUiAutomation {
public void runUiAutomation() throws Exception { public void runUiAutomation() throws Exception {
parameters = getParams(); parameters = getParams();
confirmAccess();
dismissWelcomeView(); dismissWelcomeView();
gesturesTest(); gesturesTest();
editPhotoColorTest(); editPhotoColorTest();
@ -390,7 +391,9 @@ public class UiAutomation extends UxPerfUiAutomation {
save.click(); save.click();
UiObject navigateUpButton = UiObject navigateUpButton =
getUiObjectByDescription("Navigate Up", "android.widget.ImageButton"); new UiObject(new UiSelector().descriptionContains("Navigate Up")
.className("android.widget.ImageButton"));
navigateUpButton.waitForExists(viewTimeout);
navigateUpButton.click(); navigateUpButton.click();
} }
} }