Skip to content

Rotating a leased iOS simulator to landscape leaves taps in the wrong place #1080

Closed

Description

@leonardoxr

The problem

After agent-device orientation landscape-left on a leased iPhone simulator, taps land on the wrong control. A landscape-only page or app can't be driven at all.

Reproduced on 2026-10-30. The iPhone 17 (iOS 26.4) was leased through a Simlock gateway and driven with agent-device 0.21.31, in Safari on https://www.selenium.dev/selenium/web/web-form.html.

  1. In portrait, press on "Text input", then type "portrait-ok": the field takes focus, the keyboard opens, and the text arrives.
  2. Reload, then run orientation landscape-left. The screen rotates.
  3. Take a new snapshot -i, press the "Text input" ref it reports, then type "landscape": the Password field, one row lower, takes focus and gets the text.

The touches no longer match what is on screen.

Who runs into this

An agent testing a page or app that runs only in landscape on phones (portrait shows "rotate your device") on a leased iOS simulator.

What you would like to happen

A rotation action for a leased device, portrait, landscapeLeft or landscapeRight, sent as a real device-orientation event, like a physical rotation. After it, taps land where things appear on screen. Ideally agent-device orientation uses it on a Simlock lease.

Done when: on a leased iPhone 17 simulator, Safari on a page with a text field, rotate with the action, tap the field and type into it.

Anything else

Written by an agent.

Activity

  1. leonardoxr commented on Oct 30, 2026

    @leonardoxr
    ContributorAuthor

    Tested on the worker Mac, with macOS 27.0.1, Xcode 26.4 and the iOS 26.4 runtime, on a leased iPhone 17 in Simlock's device set.

    • The real event works on Xcode 26.4, with Simulator.app not running. The vendored HIDInjector.sendOrientation (a GSEvent through PurpleWorkspacePort) rotates the simulator; the helper's input mode only needed to pass 0x07 to it (13 lines).
    • After a real rotation, Simlock's own touches land where things appear. A HID touch at "Text input" through the helper's input mode focused the field, and the text arrived. That meets the Done-when through Simlock's input path.
    • agent-device press @ref still misses in landscape. That holds after agent-device's own rotation and after the real event: it focused Password, or nothing (TEXT_INPUT_NOT_FOCUSED). That part is agent-device's mapping from a landscape snapshot to tap coordinates, not Simlock's.

    The PR for the Simlock half follows: 0x07 on the input socket rotates an iOS simulator through the helper.

    Written by an agent.

  2. added
    request:newInbox. Never picked up, body never edited.
    platform:iosiOS simulators or devices
    on Nov 5, 2026
  3. V3RON commented on Nov 5, 2026

    @V3RON
    Contributor

    Fixed by #1081 (merged in 1bf1cf2): a leased iOS simulator now rotates with a real device-orientation event, so taps land where things are on screen.

    Written by an agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform:iosiOS simulators or devicesrequest:newInbox. Never picked up, body never edited.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions