mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 14:32:31 +08:00
fix: resolution calculation for iOS
This commit is contained in:
@@ -201,6 +201,12 @@ func (wd *wdaDriver) WindowSize() (size Size, err error) {
|
||||
return Size{}, err
|
||||
}
|
||||
size = reply.Value.Size
|
||||
scale, err := wd.Scale()
|
||||
if err != nil {
|
||||
return Size{}, errors.Wrap(err, "get window size failed when obtaining scale")
|
||||
}
|
||||
size.Height = size.Height * int(scale)
|
||||
size.Width = size.Width * int(scale)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user