diff options
author | adorokhine <adorokhine@google.com> | 2017-01-10 22:34:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-10 22:34:15 -0800 |
commit | a37aeec71f9d2a863a8d09c78ce981078bc8d6ba (patch) | |
tree | 2781612bc0375c2a72fe6df4d35a4573a3933f54 /examples | |
parent | 787e6a7f501a90a10c7ea043e7d93a84cdef1153 (diff) | |
download | mobly-snippet-lib-a37aeec71f9d2a863a8d09c78ce981078bc8d6ba.tar.gz |
Update READMEs of examples to use snippet_shell. (#16)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/ex1_standalone_app/README.md | 15 | ||||
-rw-r--r-- | examples/ex2_espresso/README.md | 17 |
2 files changed, 23 insertions, 9 deletions
diff --git a/examples/ex1_standalone_app/README.md b/examples/ex1_standalone_app/README.md index b5805ed..c816400 100644 --- a/examples/ex1_standalone_app/README.md +++ b/examples/ex1_standalone_app/README.md @@ -94,7 +94,14 @@ This folder contains a fully working example of a standalone snippet apk. adb install -r ./examples/ex1_standalone_app/build/outputs/apk/ex1_standalone_app-debug.apk - <!-- TODO(adorokhine): create a snippet_client in mobly to allow you to - trigger snippets without having to create a test. Then update this - instruction. --> -1. Create a python test to trigger `getFoo` following the above instructions. +1. Use `snippet_shell` from mobly to trigger `getFoo()`: + + snippet_shell.py com.google.android.mobly.snippet.example1 + + >>> print(s.help()) + Known methods: + getBar(String) returns String // Returns the given string with the prefix "bar" + getFoo(Integer) returns String // Returns the given integer with the prefix "foo" + + >>> s.getFoo(5) + u'foo 5' diff --git a/examples/ex2_espresso/README.md b/examples/ex2_espresso/README.md index d6f5266..59fb481 100644 --- a/examples/ex2_espresso/README.md +++ b/examples/ex2_espresso/README.md @@ -111,8 +111,15 @@ to automate a simple app. adb install -r ./examples/ex2_espresso/build/outputs/apk/ex2_espresso-snippet-debug.apk - <!-- TODO(adorokhine): create a snippet_client in mobly to allow you to - trigger snippets without having to create a test. Then update this - instruction. --> -1. Create a python test to trigger the `clickButton` RPC following the above - instructions. +1. Use `snippet_shell` from mobly to trigger `click()`: + + snippet_shell.py com.google.android.mobly.snippet.example2 + + >>> print(s.help()) + Known methods: + click() returns void // Clicks the button + firstClick() returns void // Clicks the button for the first time and checks the label change + startMainActivity() returns void // Opens the main activity of the app + + >>> s.startMainActivity() + >>> s.click() |