fix(apple-runner): accept the iOS 27 floating-bar back control outside the classic header band

Merged
TH
2mo ago
+82-1

Summary

Fixes back on the iOS 27.1 Simulator when the app uses the SwiftUI floating toolbar.

That toolbar places the system back control (identifier=BackButton) at about 29% of the window's height, at midY 194 in a 678-pt window. That is below the classic header band, which ends at 149 here. The runner found the control by keyword but rejected its frame. It then tapped the leading fallback point, which on this screen is empty space.

The new isTopNavigationBackCandidateFrame keeps the classic band for every keyword match. It also accepts an exact BackButton identifier anywhere in the upper 40% of the window. The region is bounded, so a control deep in the content is still never tapped, and a keyword-only match at the same spot is still rejected. InAppBackOutcome, the unknown-vs-unavailable split (#2728), visual verification, and the macOS and tvOS branches are unchanged.

Closes #3333.

Validation

  • Four new runner unit tests cover the 27.1 frame shape, a keyword-only match below the band, the 40% bound, and the classic band. All pass on the iPhone Duo (iOS 27.1) runner build.
  • Live, iPhone Duo simulator, iOS 27.1: 01-settings.ad passed all 7 steps in 6 of 6 runs. The back step took 1.14โ€“1.23 s. runner.log shows the element tap at (418, 194) and no leading fallback. Afterwards, is exists "label=About" is false.
  • pnpm check:affected --run passed.
  • CI (iOS 26.x) does not reach this path, so only a local Duo run exercises it.

๐Ÿค– Generated with Claude Code