mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-07 05:12:51 +08:00
fix: adb double tap
This commit is contained in:
@@ -1 +1 @@
|
||||
v5.0.0-beta-2506242222
|
||||
v5.0.0-beta-2506242254
|
||||
|
||||
@@ -339,15 +339,11 @@ func (ad *ADBDriver) DoubleTap(x, y float64, opts ...option.ActionOption) error
|
||||
xStr := fmt.Sprintf("%.1f", x)
|
||||
yStr := fmt.Sprintf("%.1f", y)
|
||||
_, err = ad.runShellCommand(
|
||||
"input", "tap", xStr, yStr, ";",
|
||||
"sleep", "0.05", ";",
|
||||
"input", "tap", xStr, yStr)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, fmt.Sprintf("tap <%s, %s> failed", xStr, yStr))
|
||||
}
|
||||
time.Sleep(time.Duration(100) * time.Millisecond)
|
||||
_, err = ad.runShellCommand(
|
||||
"input", "tap", xStr, yStr)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, fmt.Sprintf("tap <%s, %s> failed", xStr, yStr))
|
||||
return errors.Wrap(err, fmt.Sprintf("double tap <%s, %s> failed", xStr, yStr))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user