mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
fix: 修复DeleteSession导致返回桌面
This commit is contained in:
@@ -157,7 +157,7 @@ func (wd *WDADriver) Setup() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (wd *WDADriver) TearDown() error {
|
func (wd *WDADriver) TearDown() error {
|
||||||
return wd.DeleteSession()
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (wd *WDADriver) InitSession(capabilities option.Capabilities) error {
|
func (wd *WDADriver) InitSession(capabilities option.Capabilities) error {
|
||||||
@@ -611,13 +611,16 @@ func (wd *WDADriver) TapAbsXY(x, y float64, opts ...option.ActionOption) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (wd *WDADriver) DoubleTapXY(x, y float64, opts ...option.ActionOption) error {
|
func (wd *WDADriver) DoubleTap(x, y float64, opts ...option.ActionOption) error {
|
||||||
// [[FBRoute POST:@"/wda/doubleTap"] respondWithTarget:self action:@selector(handleDoubleTapCoordinate:)]
|
// [[FBRoute POST:@"/wda/doubleTap"] respondWithTarget:self action:@selector(handleDoubleTapCoordinate:)]
|
||||||
var err error
|
var err error
|
||||||
if x, y, err = convertToAbsolutePoint(wd, x, y); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
actionOptions := option.NewActionOptions(opts...)
|
actionOptions := option.NewActionOptions(opts...)
|
||||||
|
if !actionOptions.AbsCoordinate {
|
||||||
|
x, y, err = convertToAbsolutePoint(wd, x, y)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
x, y = actionOptions.ApplyOffset(x, y)
|
x, y = actionOptions.ApplyOffset(x, y)
|
||||||
|
|
||||||
x = wd.toScale(x)
|
x = wd.toScale(x)
|
||||||
|
|||||||
Reference in New Issue
Block a user