refactor: get window size

This commit is contained in:
lilong.129
2024-09-02 13:41:39 +08:00
parent 4c71fc02f9
commit ee51b30b06
9 changed files with 94 additions and 86 deletions

View File

@@ -16,8 +16,6 @@ import (
)
type DriverSession struct {
// cache device window size
windowSize Size
// cache uia2/wda request and response
requests []*DriverResult
// cache session screenshot ocr results, key is image path, value is ScreenResult
@@ -71,7 +69,11 @@ type Driver struct {
urlPrefix *url.URL
sessionId string
client *http.Client
scale float64
// cache to avoid repeated query
scale float64
windowSize *Size
// cache session data
session *DriverSession
}