commit | 2797e51535fd0906326ba8785159d6d2f96f1e7d | [log] [tgz] |
---|---|---|
author | Keith Dart <keith.dart@gmail.com> | Thu Sep 28 17:54:57 2017 -0700 |
committer | Ang Li <angli@google.com> | Thu Sep 28 17:54:57 2017 -0700 |
tree | e2a5b29bdd54403b2284b7b406d686956adcb68a | |
parent | 7f7798eb4b720054f40e0f507c0b2824cabbb405 [diff] |
Add Rpcs needed to download files via HTTP. (#80) * Add an Rpc to perform an HTTP download using DownloadManager. * Add file operation Rpcs.
Mobly Bundled Snippets is a set of Snippets to allow Mobly tests to control Android devices by exposing a simplified verison of the public Android API suitable for testing.
We are adding more APIs as we go. If you have specific needs for certain groups of APIs, feel free to file a request in Issues.
Note: this is not an official Google product.
Compile and install the bundled snippets
./gradlew assembleDebug adb install -d -r -g ./build/outputs/apk/mobly-bundled-snippets-debug.apk
Use the Mobly snippet shell to interact with the bundled snippets
snippet_shell.py com.google.android.mobly.snippet.bundled >>> print(s.help()) Known methods: bluetoothDisable() returns void // Disable bluetooth with a 30s timeout. ... wifiDisable() returns void // Turns off Wi-Fi with a 30s timeout. wifiEnable() returns void // Turns on Wi-Fi with a 30s timeout. ...
To use these snippets within Mobly tests, load it on your AndroidDevice objects after registering android_device module:
def setup_class(self): self.ad = self.register_controllers(android_device, min_number=1)[0] self.ad.load_snippet('api', 'com.google.android.mobly.snippet.bundled') def test_enable_wifi(self): self.ad.api.wifiEnable()