refactor: android ui automation

This commit is contained in:
xucong053
2022-09-28 14:10:50 +08:00
parent 3a661a5be5
commit 5753955668
13 changed files with 1912 additions and 1772 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ func (ta *TouchAction) AddPointF(point PointF, startTime ...float64) *TouchActio
return ta.AddFloat(point.X, point.Y, startTime...)
}
func (d *uiaDriver) MultiPointerGesture(gesture1 *TouchAction, gesture2 *TouchAction, tas ...*TouchAction) (err error) {
func (ud *uiaDriver) MultiPointerGesture(gesture1 *TouchAction, gesture2 *TouchAction, tas ...*TouchAction) (err error) {
// Must provide coordinates for at least 2 pointers
actions := make([]*TouchAction, 0)
actions = append(actions, gesture1, gesture2)
@@ -53,7 +53,7 @@ func (d *uiaDriver) MultiPointerGesture(gesture1 *TouchAction, gesture2 *TouchAc
"actions": actions,
}
// register(postHandler, new MultiPointerGesture("/wd/hub/session/:sessionId/touch/multi/perform"))
_, err = d.httpPOST(data, "/session", d.sessionId, "/touch/multi/perform")
_, err = ud.httpPOST(data, "/session", ud.sessionId, "/touch/multi/perform")
return
}