@@ -71,13 +71,35 @@ d.long_click(0.5, 0.4)
71
71
d.swipe(0.5 , 0.8 , 0.5 , 0.4 , speed = 2000 )
72
72
d.input_text(0.5 , 0.5 , " adbcdfg" )
73
73
74
+
75
+ # Device touch gersture
76
+ d.gesture.start(630 , 984 , interval = .5 ).move(0.2 , 0.4 ).pause(interval = 1 ).move(0.5 , 0.6 ).action()
77
+ d.gesture.start(0.77 , 0.49 ).action() # click
78
+
79
+
74
80
# App Element
75
- d(text = " showToast" ).info
81
+ d(id = " swiper" ).exists()
82
+ d(type = " Button" , text = " tab_recrod" ).exists()
83
+ d(text = " tab_recrod" , isAfter = True ).exists()
84
+ d(text = " tab_recrod" ).click_if_exists()
85
+ d(type = " Button" , index = 3 ).click()
86
+ d(text = " tab_recrod" ).double_click()
87
+ d(text = " tab_recrod" ).long_click()
88
+
89
+ component: ComponentData = d(type = " ListItem" , index = 1 ).find_component()
90
+ d(type = " ListItem" ).drag_to(component)
91
+
92
+ d(text = " tab_recrod" ).input_text(" abc" )
93
+ d(text = " tab_recrod" ).clear_text()
94
+ d(text = " tab_recrod" ).pinch_in()
95
+ d(text = " tab_recrod" ).pinch_out()
96
+
97
+ d(text = " tab_recrod" ).info
76
98
# {
77
99
# "id": "",
78
100
# "key": "",
79
101
# "type": "Button",
80
- # "text": "showToast ",
102
+ # "text": "tab_recrod ",
81
103
# "description": "",
82
104
# "isSelected": False,
83
105
# "isChecked": False,
@@ -99,29 +121,14 @@ d(text="showToast").info
99
121
# }
100
122
# }
101
123
102
- d(id = " swiper" ).exists()
103
- d(type = " Button" , text = " tab_recrod" ).exists()
104
- d(text = " tab_recrod" , isAfter = True ).exists()
105
- d(text = " tab_recrod" ).click_if_exists()
106
- d(type = " Button" , index = 3 ).click()
107
- d(text = " tab_recrod" ).double_click()
108
- d(text = " tab_recrod" ).long_click()
109
-
110
- component: ComponentData = d(type = " ListItem" , index = 1 ).find_component()
111
- d(type = " ListItem" ).drag_to(component)
112
-
113
- d(text = " tab_recrod" ).input_text(" abc" )
114
- d(text = " tab_recrod" ).clear_text()
115
- d(text = " tab_recrod" ).pinch_in()
116
- d(text = " tab_recrod" ).pinch_out()
117
124
118
125
# Dump hierarchy
119
126
d.dump_hierarchy()
120
127
121
128
# Toast Watcher
122
129
d.toast_watcher.start()
123
130
d(type = " Button" , text = " tab_recrod" ).click() # 触发toast的操作
124
- toast = d.toast_watcher.get ()
131
+ toast = d.toast_watcher.get_toast ()
125
132
126
133
```
127
134
0 commit comments