Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7aceb8d8 authored by Joe Malin's avatar Joe Malin Committed by Android Git Automerger
Browse files

am 55ee1d66: Merge "DOC CHANGE: Fix bug 3448489 - Monkeyrunner example" into honeycomb

* commit '55ee1d66':
  DOC CHANGE: Fix bug 3448489 - Monkeyrunner example
parents 002c028c 55ee1d66
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -110,8 +110,17 @@ device = MonkeyRunner.waitForConnection()
# to see if the installation worked.
device.installPackage('myproject/bin/MyApplication.apk')

# Runs an activity in the application
device.startActivity(component='com.example.android.myapplication.MainActivity')
# sets a variable with the package's internal name
package = 'com.example.android.myapplication'

# sets a variable with the name of an Activity in the package
activity = 'com.example.android.myapplication.MainActivity'

# sets the name of the component to start
runComponent = package + '/' + activity

# Runs the component
device.startActivity(component=runComponent)

# Presses the Menu button
device.press('KEYCODE_MENU','DOWN_AND_UP')