Skip to content

fix: anchor native Duo coordinates to application windows - #1292

Merged
KazuCocoa merged 7 commits into
fix/duo-display-gesturesfrom
fix/duo-native-coordinates
Oct 7, 2026
Merged

KazuCocoa merged 7 commits into
fix/duo-display-gesturesfrom
fix/duo-native-coordinates

Conversation

@KazuCocoa

@KazuCocoa KazuCocoa commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

On Duo's inner display, native coordinate tap, double tap, hold, and drag could return success without delivering a touch at the requested location. Anchor application-root coordinates on a selected secondary display to the containing application window, preserving XCTest's display affinity.

The window must belong to the selected display. A reproduced case selected display 3 but returned a window on display 1; the regression test now verifies that this request fails without returning a coordinate. Resolve each window before reading its screen, then require both display affinity and point containment. Element-relative and default main-display native coordinate paths retain their existing behavior.

Targets fix/duo-display-gestures (#1288) and includes its latest regression fixes through a merge. #1291 handles screen metadata independently. Related to appium/appium#22857.

Validation

  • Final native window-affinity fix on Duo / iOS 27.1: four tests pass, covering wrong-display rejection, native corner taps through closed → book → open → closed, ordinary native coordinates, and default versus explicit main-display selection. The wrong-display test failed before the fix, returning a display-1 window for display 3.
  • Combined regression matrix: iPhone 17 / iOS 26.5 and 27.0; iPhone 18 Pro / 27.2; iPhone SE (2nd generation) / 26.5; iPad A16 / iPadOS 26.5, 27.0, and 27.2; Duo / 27.1. Final applicable gesture, geometry, and default-selection cases pass. The final left/right native corner tests pass separately on all six ordinary phone/tablet configurations, and in the SE suite.
  • The fixture reports rotation completion. Each ordinary-device orientation starts independently from portrait; an immediate 180-degree flip can race UIKit even through the unchanged master main-display coordinate path. This PR does not change rotation timing.
  • Earlier HTTP validation passed all 18 Duo pose/gesture cases (tap, double tap, hold, drag, element drag, velocity drag). Assertions check actual delivered touch positions. iOS/tvOS runner builds passed; the merged fix: align Duo W3C actions and scrolling #1288 watchOS guard also passes a local watchOS simulator build.

Physical testing is deferred. CI for the updated heads is in progress.

element:(XCUIElement *)element
error:(NSError **)error
{
if (element.elementType == XCUIElementTypeApplication) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can we make it to a guard for better readiblity?

@KazuCocoa
KazuCocoa merged commit 5ed90c8 into fix/duo-display-gestures Oct 7, 2026
102 of 106 checks passed
@KazuCocoa
KazuCocoa deleted the fix/duo-native-coordinates branch October 7, 2026 03:43
KazuCocoa added a commit that referenced this pull request Oct 8, 2026
* feat: add currentDisplayId setting for screenshots

* chore: remove boolean check from currentDisplayId validation

* feat: target the currentDisplayId display with W3C actions

* fix: validate display settings and report available ids

* test: fix available-display assertion syntax

* refactor: clarify the display coordinate correction

* feat: support Duo hinge control and secondary display capture

* fix: align element actions and scrolling on secondary displays

* remove simulator only logic, temporary implementation

* add get

* refactor a bit

* refactor: separate hinge capabilities and delegate screen lookup

* fix: guard display APIs for older XCTest versions

* refactor: name hinge timeout and document runtime loading

* docs: explain why hinge events bypass the existing HID helper

* revert unnecessary chnages in the readme

* refactor: unify display checks and scroll geometry

* fix: guard scrolling orientation APIs on watchOS (#1294)

* fix: preserve display-independent actions and correct landscape scrolling

* refactor: clarify display validation and action synthesis stages

* test: preserve shared alert fixture in display-independent action test

* fix: anchor native Duo coordinates to application windows (#1292)

* fix: anchor native Duo coordinates to application windows

* test: cover native coordinates across displays and orientations

* fix: restrict native coordinates to windows on the selected display

* refactor: use guards for native gesture coordinate routing

* docs: document legacy SDK coordinate limitations on Duo

* test: wait for rotated gesture fixture geometry to settle

* docs: record verified Duo simulator capture and layout limitations

* fix: normalize portrait geometry for landscape-native screens

* fix: align application origins on secondary displays

* fix: preserve native gesture edge coordinates

* shorten

---------

Co-authored-by: Jason Steinberg <j.steinberg702@gmail.com>
github-actions Bot pushed a commit that referenced this pull request Oct 8, 2026
## [16.14.2](v16.14.1...v16.14.2) (2026-10-08)

### Bug Fixes

* align Duo W3C actions and scrolling ([#1288](#1288)) ([104a31c](104a31c)), closes [#1294](#1294) [#1292](#1292)
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