The first step is to get the coordinate values of the edit box, button
Open the simulator, tap QQ
Enter as code in the Monkeyrunner environment
From Com.android.monkeyrunner import monkeyrunner,monkeydevicefrom com.android.monkeyrunner.recorder Import Monkeyrecorder as Recorderdevice=monkeyrunner.waitforconnection ()
Device.startactivity (component = "cn.fbtech.fbuser/cn.fbtech.fbuser.activity.loginactivity")
Recorder.start (device)
Then, as shown, click on the Account entry box, password entry box, login button. Write down the coordinates
Step two, log in
Input code
fromCom.android.monkeyrunnerImportMonkeyrunner,monkeydevice Device=monkeyrunner.waitforconnection ()#Start Activitydevice.startactivity (Component="Cn.fbtech.fbuser/cn.fbtech.fbuser.activity.loginactivity ")
#login screen, click the Account entry box
Device.touch (57,246,'down_and_up')
Device.type ('1507xxxxx60')#Enter your account
#login screen, click the Password box
Device.touch (54,298,'down_and_up')
Device.type ('xxxxxx')#Enter Password
Device.touch (235,366, ' down_and_up ')
111
Monkeyrunner Login App