mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-04 23:39:33 +08:00
change: update function optional parameters to DataOptions
This commit is contained in:
@@ -573,7 +573,7 @@ func (ud *uiaDriver) _swipe(startX, startY, endX, endY interface{}, options ...D
|
||||
}
|
||||
|
||||
// append options in post data for extra uiautomator configurations
|
||||
// e.g. use WithPressDuration to set pressForDuration
|
||||
// e.g. use WithPressDurationOption to set pressForDuration
|
||||
for _, option := range options {
|
||||
option(data)
|
||||
}
|
||||
@@ -590,7 +590,7 @@ func (ud *uiaDriver) _swipe(startX, startY, endX, endY interface{}, options ...D
|
||||
// per step. So for a 100 steps, the swipe will take about 1/2 second to complete.
|
||||
// `steps` is the number of move steps sent to the system
|
||||
func (ud *uiaDriver) Swipe(fromX, fromY, toX, toY int, options ...DataOption) error {
|
||||
options = append(options, WithSteps(12))
|
||||
options = append(options, WithStepsOption(12))
|
||||
return ud.SwipeFloat(float64(fromX), float64(fromY), float64(toX), float64(toY), options...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user