aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinhui Wang <jinhuiw@google.com>2016-07-28 15:22:54 -0700
committerJinhui Wang <jinhuiw@google.com>2016-07-28 15:26:00 -0700
commitf1298034c2566013168d1467dac47be3d431348b (patch)
tree9ffe2e097d509b9e690c1e47a2fb9e554fce33e2
parent52d915ef231b617a24b57a44371467ecda19cb52 (diff)
downloadAfwTestHarness-f1298034c2566013168d1467dac47be3d431348b.tar.gz
Update Ui watch to auto close dialog with button "Close"
Change-Id: I21ddd055058128886b326a5d6c749bb90d643a5d
-rw-r--r--README20
-rw-r--r--libs/UiAutomatorLib/src/com/android/afwtest/uiautomator/test/AfwTestUiWatcher.java3
2 files changed, 16 insertions, 7 deletions
diff --git a/README b/README
index 57249bf..111dd68 100644
--- a/README
+++ b/README
@@ -49,9 +49,16 @@ wifi_security_type (optional, available options are: NONE, WEP or WPA)
Build Afw Test Harness
----------------------
+Before building or running the harness, init the environment variables:
+
+ $ source build/envsetup.sh
+ $ lunch
+
+Select a proper device type and press Enter.
+
To build Afw Test Harness, browse to this directory and then:
- make afw-test-harness
+ $ make afw-test-harness -j24
Similar to CTS, "make afw-test-harness" will create a directory,
@@ -66,12 +73,12 @@ Run Afw Test Harness
----------------------------------------------
1. From building environment, launch the test runner from the command line:
- afw-test-tradefed
+ $ afw-test-tradefed
2. From the unzipped folder of android-afw-test-harness.zip, launch the test
runner from the command line:
- ./android‐cts/tools/afw-test‐tradefed
+ $ ./android‐cts/tools/afw-test‐tradefed
Make sure the ./android‐cts/repository/testcases/afw-test.props has the
testing work account and WIFI configuration.
@@ -92,7 +99,7 @@ Run Afw Test Harness
4. Run a single test package, for example "com.android.afwtest.nfcprovisioning"
- run cts --package com.google.android.afwtest.NfcProvisioning
+ cts-tf > run cts --package com.google.android.afwtest.NfcProvisioning
All packages can be found by executing "list packages" command in
afw-test-tradefed console.
@@ -100,6 +107,7 @@ Run Afw Test Harness
5. If the device supports both 64 bits & 32 bits abi, you can force the test
harness to run on a specific abi, e.g.:
- run cts --plan afw-userdebug-build --force-abi 64
+ cts-tf > run cts --plan afw-userdebug-build --force-abi 64
-6.For more options: 'run cts --help'
+6.For more options:
+ cts-tf > run cts --help
diff --git a/libs/UiAutomatorLib/src/com/android/afwtest/uiautomator/test/AfwTestUiWatcher.java b/libs/UiAutomatorLib/src/com/android/afwtest/uiautomator/test/AfwTestUiWatcher.java
index 3d9ba2f..f4b7f3e 100644
--- a/libs/UiAutomatorLib/src/com/android/afwtest/uiautomator/test/AfwTestUiWatcher.java
+++ b/libs/UiAutomatorLib/src/com/android/afwtest/uiautomator/test/AfwTestUiWatcher.java
@@ -85,7 +85,8 @@ public final class AfwTestUiWatcher implements UiWatcher {
private static final String[] ACCEPT_WORDS = {
"[aA]ccept", "ACCEPT",
"[aA]gree", "AGREE",
- "[aA]llow", "ALLOW"};
+ "[aA]llow", "ALLOW",
+ "[cC]lose", "CLOSE"};
/**
* {@link Pattern} to match any "Accept" word in {@link #ACCEPT_WORDS}.