mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-14 14:48:53 +00:00
Merge pull request #9 from jimboatarm/code_maintenance
Move confirmAccess method to UxPerfUiAutomation
This commit is contained in:
commit
1531110bd3
Binary file not shown.
@ -267,6 +267,16 @@ public class UxPerfUiAutomation extends BaseUiAutomation {
|
||||
out.close();
|
||||
}
|
||||
|
||||
public void confirmAccess() 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"));
|
||||
// Some devices request multiple permisson rights so clear them all here
|
||||
while (allowButton.waitForExists(timeout)) {
|
||||
allowButton.clickAndWaitForNewWindow(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
public void startDumpsysSurfaceFlinger(Bundle parameters, String view) {
|
||||
if (Boolean.parseBoolean(parameters.getString("dumpsys_enabled"))) {
|
||||
initDumpsysSurfaceFlinger(parameters.getString("package"), view);
|
||||
|
Binary file not shown.
Binary file not shown.
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));
|
||||
|
Binary file not shown.
@ -77,16 +77,6 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
signinButton.clickAndWaitForNewWindow();
|
||||
}
|
||||
|
||||
private void confirmAccess() 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"));
|
||||
// Some devices request multiple permisson rights so clear them all here
|
||||
while (allowButton.waitForExists(timeout)) {
|
||||
allowButton.clickAndWaitForNewWindow(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
private void selectContact(String name, String id) throws Exception {
|
||||
Timer timer = new Timer();
|
||||
timer.start();
|
||||
@ -150,5 +140,4 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
exitDumpsysGfxInfo(PACKAGE, new File(outputDir, dumpsysTag + "_gfxInfo.log"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user