Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张浩
/
BrUITest
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
4795d22e
...
4795d22e923832858e103b741c69797e4d8d9df5
authored
2021-06-02 14:45:02 +0800
by
zhanghao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
303ab88d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
30 deletions
android/exitLogin.air/exitLogin.py
android/login.air/tpl1622181656726.png → android/exitLogin.air/tpl1622181656726.png
android/login.air/tpl1622181674939.png → android/exitLogin.air/tpl1622181674939.png
android/login.air/tpl1622181688365.png → android/exitLogin.air/tpl1622181688365.png
android/login.air/tpl1622181718756.png → android/exitLogin.air/tpl1622181718756.png
android/login.air/login.py
android/run.air/run.py
android/exitLogin.air/exitLogin.py
0 → 100644
View file @
4795d22
# -*- encoding=utf8 -*-
__author__
=
"zhanghao"
from
airtest.core.api
import
*
def
exitLogin
():
touch
(
Template
(
r"tpl1622181656726.png"
,
record_pos
=
(
0.306
,
-
0.932
),
resolution
=
(
1080
,
2340
)))
sleep
(
3
)
touch
(
Template
(
r"tpl1622181674939.png"
,
record_pos
=
(
-
0.005
,
0.621
),
resolution
=
(
1080
,
2340
)))
sleep
(
3
)
touch
(
Template
(
r"tpl1622181688365.png"
,
record_pos
=
(
0.211
,
0.129
),
resolution
=
(
1080
,
2340
)))
sleep
(
3
)
assert_exists
(
Template
(
r"tpl1622181718756.png"
,
record_pos
=
(
0.0
,
-
0.31
),
resolution
=
(
1080
,
2340
)),
"验证退出登录正确"
)
\ No newline at end of file
android/
l
ogin.air/tpl1622181656726.png
→
android/
exitL
ogin.air/tpl1622181656726.png
View file @
4795d22
14.8 KB
android/
l
ogin.air/tpl1622181674939.png
→
android/
exitL
ogin.air/tpl1622181674939.png
View file @
4795d22
13.6 KB
android/
l
ogin.air/tpl1622181688365.png
→
android/
exitL
ogin.air/tpl1622181688365.png
View file @
4795d22
6.3 KB
android/
l
ogin.air/tpl1622181718756.png
→
android/
exitL
ogin.air/tpl1622181718756.png
View file @
4795d22
38.1 KB
android/login.air/login.py
View file @
4795d22
...
...
@@ -3,33 +3,16 @@ __author__ = "zhanghao"
from
airtest.core.api
import
*
auto_setup
(
__file__
,
logdir
=
True
)
connect_device
(
"Android:///2PF4C19807005028?cap_method=javacap&touch_method=adb"
)
sleep
(
3
)
wake
()
sleep
(
3
)
start_app
(
"com.borui.gsjk"
)
sleep
(
8
)
touch
(
Template
(
r"tpl1622181202002.png"
,
record_pos
=
(
-
0.226
,
-
0.798
),
resolution
=
(
1080
,
2340
)))
sleep
(
8
)
text
(
"13683238581"
)
sleep
(
3
)
touch
(
Template
(
r"tpl1622181244594.png"
,
record_pos
=
(
-
0.303
,
-
0.631
),
resolution
=
(
1080
,
2340
)))
sleep
(
3
)
text
(
"6666"
)
touch
(
Template
(
r"tpl1622181266358.png"
,
record_pos
=
(
0.002
,
-
0.308
),
resolution
=
(
1080
,
2340
)))
sleep
(
6
)
touch
(
Template
(
r"tpl1622181344490.png"
,
record_pos
=
(
0.009
,
0.414
),
resolution
=
(
1080
,
2340
)))
sleep
(
10
)
assert_exists
(
Template
(
r"tpl1622181656726.png"
,
record_pos
=
(
0.306
,
-
0.932
),
resolution
=
(
1080
,
2340
)),
"验证登录正确"
)
touch
(
Template
(
r"tpl1622181656726.png"
,
record_pos
=
(
0.306
,
-
0.932
),
resolution
=
(
1080
,
2340
)))
sleep
(
3
)
touch
(
Template
(
r"tpl1622181674939.png"
,
record_pos
=
(
-
0.005
,
0.621
),
resolution
=
(
1080
,
2340
)))
sleep
(
3
)
touch
(
Template
(
r"tpl1622181688365.png"
,
record_pos
=
(
0.211
,
0.129
),
resolution
=
(
1080
,
2340
)))
sleep
(
3
)
assert_exists
(
Template
(
r"tpl1622181718756.png"
,
record_pos
=
(
0.0
,
-
0.31
),
resolution
=
(
1080
,
2340
)),
"验证退出登录正确"
)
stop_app
(
"com.borui.gsjk"
)
def
login
():
touch
(
Template
(
r"tpl1622181202002.png"
,
record_pos
=
(
-
0.226
,
-
0.798
),
resolution
=
(
1080
,
2340
)))
sleep
(
8
)
text
(
"13683238581"
)
sleep
(
3
)
touch
(
Template
(
r"tpl1622181244594.png"
,
record_pos
=
(
-
0.303
,
-
0.631
),
resolution
=
(
1080
,
2340
)))
sleep
(
3
)
text
(
"6666"
)
touch
(
Template
(
r"tpl1622181266358.png"
,
record_pos
=
(
0.002
,
-
0.308
),
resolution
=
(
1080
,
2340
)))
sleep
(
6
)
touch
(
Template
(
r"tpl1622181344490.png"
,
record_pos
=
(
0.009
,
0.414
),
resolution
=
(
1080
,
2340
)))
sleep
(
10
)
assert_exists
(
Template
(
r"tpl1622181656726.png"
,
record_pos
=
(
0.306
,
-
0.932
),
resolution
=
(
1080
,
2340
)),
"验证登录正确"
)
...
...
android/run.air/run.py
0 → 100644
View file @
4795d22
# -*- encoding=utf8 -*-
__author__
=
"zhanghao"
from
airtest.core.api
import
*
using
(
"login.air"
)
using
(
"exitLogin.air"
)
from
login
import
login
from
exitLogin
import
exitLogin
auto_setup
(
__file__
,
logdir
=
True
)
connect_device
(
"Android:///2PF4C19807005028?cap_method=javacap&touch_method=adb"
)
sleep
(
3
)
wake
()
sleep
(
3
)
start_app
(
"com.borui.gsjk"
)
sleep
(
8
)
login
()
sleep
(
3
)
exitLogin
()
sleep
(
3
)
stop_app
(
"com.borui.gsjk"
)
Please
register
or
sign in
to post a comment