TA的每日心情 | 慵懒 2017-10-9 10:04 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
本帖最后由 2339073008 于 2017-10-9 10:05 编辑
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage
device=MonkeyRunner.waitForConnection(5,'559a4ec5')
result = device.takeSnapshot()
result.writeToFile('D:\monkeyrunner\test1\Test1_001.png','png')
print ('Success!')
device.installPackage('D:\monkeyrunner\JiaoTongJDTralvel.apk')
print ('Install Success!')
MonkeyRunner.sleep(5)
device.startActivity(component = "com.jiaotong.app/.mvp.module.launch.SplashScreenActivity")
result = device.takeSnapshot()
result.writeToFile('D:\monkeyrunner\test1\Test1_002.png','png')
print ('Success!')
MonkeyRunner.sleep(5)
device.drag((180,180),(600,600),0.1,10)
>>> device.touch(250,450,'Down_And_Up')
170927 11:12:14.112:S [main] [com.android.chimpchat.adb.AdbChimpDevice] Error se
nding touch event: 250 450 DOWN_AND_UP
170927 11:12:14.112:S [main] [com.android.chimpchat.adb.AdbChimpDevice]java.net.
SocketException: Software caused connection abort: socket write error
170927 11:12:14.112:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketOutputStream.socketWrite0(Native Method)
170927 11:12:14.112:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
>>> device.touch(250,450,'DOWN_AND_UP')
170927 11:13:46.857:S [main] [com.android.chimpchat.adb.AdbChimpDevice] Error se
nding touch event: 250 450 DOWN_AND_UP
170927 11:13:46.857:S [main] [com.android.chimpchat.adb.AdbChimpDevice]java.net.
SocketException: Software caused connection abort: socket write error
170927 11:13:46.857:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketOutputStream.socketWrite0(Native Method)
170927 11:13:46.857:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
>>> device.touch(250,450,"DOWN_AND_UP")
170927 11:26:48.736:S [main] [com.android.chimpchat.adb.AdbChimpDevice] Error se
nding touch event: 250 450 DOWN_AND_UP
170927 11:26:48.736:S [main] [com.android.chimpchat.adb.AdbChimpDevice]java.net.
SocketException: Software caused connection abort: socket write error
170927 11:26:48.736:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketOutputStream.socketWrite0(Native Method)
170927 11:26:48.736:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
|
|