appium / WebDriverAgent

A WebDriver server for iOS and tvOS
Other
1.15k stars 363 forks source link

feat: add system screen size/width in the system info endpoint #881

Closed KazuCocoa closed 3 months ago

KazuCocoa commented 3 months ago

Add screenSize by system app in the device screen info. The status bar also refers to the system app, so they should be good. statusBarSizeForApplication does not use application, so this pr removes the argument as well.

endpoint: http://localhost:8100/wda/screen

tv

{
    "value": {
        "statusBarSize": {
            "width": 0,
            "height": 0
        },
        "scale": 2,
        "screenSize": {
            "width": 1920,
            "height": 1080
        }
    },
    "sessionId": null
}

iphone

{
    "value": {
        "statusBarSize": {
            "width": 393,
            "height": 54
        },
        "scale": 3,
        "screenSize": {
            "width": 393,
            "height": 852
        }
    },
    "sessionId": null
}

Tested with

github-actions[bot] commented 3 months ago

:tada: This PR is included in version 8.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: