Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Apr 1, 2024

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Mar 31, 2024

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

  • tvOS 16, 17
    • 17 real device
  • ios 15.8, 16.4, 17.3 real devices

XCUIApplication *app = XCUIApplication.fb_systemApplication;

XCUIElement *mainStatusBar = app.statusBars.allElementsBoundByIndex.firstObject;
CGSize statusBarSize = (nil == mainStatusBar) ? CGSizeZero : mainStatusBar.frame.size;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space here

@KazuCocoa KazuCocoa merged commit 5ebc71c into master Apr 1, 2024
11 of 34 checks passed
@KazuCocoa KazuCocoa deleted the add-screen-size branch April 1, 2024 06:56
github-actions bot pushed a commit that referenced this pull request Apr 1, 2024
## [8.4.0](v8.3.1...v8.4.0) (2024-04-01)

### Features

* add system screen size/width in the system info endpoint ([#881](#881)) ([5ebc71c](5ebc71c))
Copy link

github-actions bot commented Apr 1, 2024

🎉 This PR is included in version 8.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants