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

@@ -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
}