Skip to content

feat: add get screens endpoint - #1242

Merged
KazuCocoa merged 3 commits into
masterfrom
screens
Sep 1, 2026
Merged

feat: add get screens endpoint#1242
KazuCocoa merged 3 commits into
masterfrom
screens

Conversation

@KazuCocoa

@KazuCocoa KazuCocoa commented Aug 30, 2026

Copy link
Copy Markdown
Member

e.g.

With external display via iPad.

{
  "value" : [
    {
      "scale" : 2,
      "traits" : 1,
      "isMain" : true,
      "bounds" : {
        "y" : 0,
        "x" : 0,
        "width" : 1640,
        "height" : 2360
      },
      "displayId" : 1
    },
    {
      "scale" : 2,
      "traits" : 4,
      "isMain" : false,
      "bounds" : {
        "y" : 0,
        "x" : 0,
        "width" : 6016,
        "height" : 3384
      },
      "displayId" : 2
    }
  ],
  "sessionId" : null
}

/wda/screen shows current 'main' screen while this endpoint shows available screens.

This non-main display does not function right now, but could extend some features at least such as screenshot, element handling etc. For example, XCUIElement and XCElementSnapshot have displayID

I won't add this endpoint call from xcuitest driver only with this change.

[[FBRoute GET:@"/wda/screen"] respondWithTarget:self action:@selector(handleGetScreen:)],
[[FBRoute GET:@"/wda/screen"].withoutSession respondWithTarget:self action:@selector(handleGetScreen:)],
[[FBRoute GET:@"/wda/screens"] respondWithTarget:self action:@selector(handleGetScreens:)],
[[FBRoute GET:@"/wda/screens"].withoutSession respondWithTarget:self action:@selector(handleGetScreens:)],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should it also be marked as standalone?

@KazuCocoa
KazuCocoa merged commit 55808de into master Sep 1, 2026
47 of 60 checks passed
@KazuCocoa
KazuCocoa deleted the screens branch September 1, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants