From a37aeec71f9d2a863a8d09c78ce981078bc8d6ba Mon Sep 17 00:00:00 2001 From: adorokhine Date: Tue, 10 Jan 2017 22:34:15 -0800 Subject: Update READMEs of examples to use snippet_shell. (#16) --- examples/ex1_standalone_app/README.md | 15 +++++++++++---- examples/ex2_espresso/README.md | 17 ++++++++++++----- 2 files changed, 23 insertions(+), 9 deletions(-) (limited to 'examples') 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 - -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 - -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() -- cgit v1.2.3