fix: resolution calculation for iOS

This commit is contained in:
buyuxiang
2023-08-28 16:18:07 +08:00
parent c611a84aaa
commit afe304f58c
4 changed files with 14 additions and 13 deletions

View File

@@ -15,12 +15,8 @@ func (dExt *DriverExt) TapXY(x, y float64, options ...ActionOption) error {
return fmt.Errorf("x, y percentage should be <= 1, got x=%v, y=%v", x, y)
}
scale, err := dExt.Driver.Scale()
if err != nil {
return fmt.Errorf("failed to get scale: %v", err)
}
x = x * float64(dExt.windowSize.Width) * scale
y = y * float64(dExt.windowSize.Height) * scale
x = x * float64(dExt.windowSize.Width)
y = y * float64(dExt.windowSize.Height)
return dExt.TapAbsXY(x, y, options...)
}