fix: failed to set duration option of swipe action

This commit is contained in:
xucong.053
2022-11-09 16:04:14 +08:00
parent c4f966748c
commit df2e255d8f
2 changed files with 1 additions and 3 deletions
-2
View File
@@ -440,12 +440,10 @@ func (wd *wdaDriver) DragFloat(fromX, fromY, toX, toY float64, options ...DataOp
}
func (wd *wdaDriver) Swipe(fromX, fromY, toX, toY int, options ...DataOption) error {
options = append(options, WithDataPressDuration(0))
return wd.SwipeFloat(float64(fromX), float64(fromY), float64(toX), float64(toY), options...)
}
func (wd *wdaDriver) SwipeFloat(fromX, fromY, toX, toY float64, options ...DataOption) error {
options = append(options, WithDataPressDuration(0))
return wd.DragFloat(fromX, fromY, toX, toY, options...)
}