mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-29 22:24:51 +00:00
Move confirmAccess method to UxPerfUiAutomation
Move confirmAccess method out of reader and skype workloads into UxPerfUiAutomation base class for code reuse. Amend project properties for reader workload to use SDK version 18. Update jar files appropriately.
This commit is contained in:
Binary file not shown.
@@ -11,4 +11,4 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-21
|
||||
target=android-18
|
||||
|
||||
@@ -33,7 +33,7 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
|
||||
signInOnline(parameters);
|
||||
|
||||
confirmLocalFileAccess();
|
||||
confirmAccess();
|
||||
|
||||
gesturesTest("Getting Started.pdf");
|
||||
|
||||
@@ -122,15 +122,6 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
}
|
||||
}
|
||||
|
||||
private void confirmLocalFileAccess() throws Exception {
|
||||
// First time run requires confirmation to allow access to local files
|
||||
UiObject allowButton = new UiObject(new UiSelector().textContains("Allow")
|
||||
.className("android.widget.Button"));
|
||||
if (allowButton.waitForExists(timeout)) {
|
||||
allowButton.clickAndWaitForNewWindow(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
private void openFile(final String filename) throws Exception {
|
||||
|
||||
String TestTag = "openfile";
|
||||
@@ -140,7 +131,7 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
|
||||
timingResults.put(String.format(TestTag + "_" + "selectLocalFilesList" + "_" + file), selectLocalFilesList());
|
||||
// On some devices permissions to access local files occurs here rather than the earlier step
|
||||
confirmLocalFileAccess();
|
||||
confirmAccess();
|
||||
timingResults.put(String.format(TestTag + "_" + "selectSearchDuration" + "_" + file), selectSearchFileButton());
|
||||
timingResults.put(String.format(TestTag + "_" + "searchFileList" + "_" + file), searchFileList(filename));
|
||||
timingResults.put(String.format(TestTag + "_" + "openFileFromList" + "_" + file), openFileFromList(filename));
|
||||
|
||||
Reference in New Issue
Block a user