mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-09 17:59:36 +08:00
feat: ApplySwipeOffset
This commit is contained in:
@@ -641,6 +641,9 @@ func (wd *WDADriver) Drag(fromX, fromY, toX, toY float64, opts ...option.ActionO
|
||||
fromY = wd.toScale(fromY)
|
||||
toX = wd.toScale(toX)
|
||||
toY = wd.toScale(toY)
|
||||
actionOptions := option.NewActionOptions(opts...)
|
||||
fromX, fromY, toX, toY = actionOptions.ApplySwipeOffset(fromX, fromY, toX, toY)
|
||||
|
||||
data := map[string]interface{}{
|
||||
"fromX": math.Round(fromX*10) / 10,
|
||||
"fromY": math.Round(fromY*10) / 10,
|
||||
|
||||
Reference in New Issue
Block a user