-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathwx-mp-nnhszh-pay0.01.js
106 lines (86 loc) · 2.55 KB
/
wx-mp-nnhszh-pay0.01.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
var clicks = require('./function/clicks.js')
var exists = require('./function/exists.js')
var others = require('./function/others.js')
var sleeps = require('./function/sleeps.js')
var swipes = require('./function/swipes.js')
currentAPP = {}
currentAPP.PACKAGE_NAME = 'com.shuqi.controller'
currentAPP.NAME = getAppName(currentAPP.PACKAGE_NAME)
currentAPP.VERSION = ''
currentAPP.APK = ''
main()
function main() {
others.fixDir()
others.fixDir()
log('---------- start ----------')
// taskText()
taskXy()
log('---------- end ----------')
}
function taskXy() {
for (var i = 0; i < 50000000; i++) {
log(i)
// 捐一笔
clicks.xy(device.width - 100, device.height - 100)
// 我已知情
clicks.xy(device.width / 2 + 200, device.height / 2 + 600)
clicks.xy(device.width / 2, device.height - 400)
longClick(device.width / 2, device.height / 2)
sleeps.s1()
clicks.xy(device.width / 2, device.height / 2 - 100)
clicks.xy(device.width / 2, device.height / 2 + 300)
sleeps.s5()
clicks.textIfExists('Confirm Payment')
// 输入密码
password = '123456789'
if (text(password).exists()) {
text(password).click()
sleep(50)
}
password = '123456789'
if (text(password).exists()) {
text(password).click()
sleep(50)
}
password = '123456789'
if (text(password).exists()) {
text(password).click()
sleep(50)
}
password = '123456789'
if (text(password).exists()) {
text(password).click()
sleep(50)
}
password = '123456789'
if (text(password).exists()) {
text(password).click()
sleep(50)
}
password = '123456789'
if (text(password).exists()) {
text(password).click()
sleep(50)
}
sleeps.s5()
others.back()
sleeps.s5()
sleeps.s1()
// 返回项目
clicks.xy(device.width / 2 - 120, device.height / 2 + 720)
sleeps.s5()
}
}
function taskText() {
clicks.textIfExists('捐一笔')
clicks.textIfExists('自定义金额')
setText('0.01')
sleeps.s2to3()
clicks.textIfExists('确认支付 0.01 元')
clicks.textIfExists('123456789')
clicks.textIfExists('123456789')
clicks.textIfExists('123456789')
clicks.textIfExists('123456789')
clicks.textIfExists('123456789')
clicks.textIfExists('123456789')
}