@@ -71,13 +71,35 @@ d.long_click(0.5, 0.4)
7171d.swipe(0.5 , 0.8 , 0.5 , 0.4 , speed = 2000 )
7272d.input_text(0.5 , 0.5 , " adbcdfg" )
7373
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+
7480# 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
7698# {
7799# "id": "",
78100# "key": "",
79101# "type": "Button",
80- # "text": "showToast ",
102+ # "text": "tab_recrod ",
81103# "description": "",
82104# "isSelected": False,
83105# "isChecked": False,
@@ -99,29 +121,14 @@ d(text="showToast").info
99121# }
100122# }
101123
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()
117124
118125# Dump hierarchy
119126d.dump_hierarchy()
120127
121128# Toast Watcher
122129d.toast_watcher.start()
123130d(type = " Button" , text = " tab_recrod" ).click() # 触发toast的操作
124- toast = d.toast_watcher.get ()
131+ toast = d.toast_watcher.get_toast ()
125132
126133```
127134
0 commit comments