Skip to content

Locators inside a WebView, and find answering from the page (CHALLENGES 312) - #204

Merged
lana-20 merged 1 commit into
mainfrom
web-locators
Oct 13, 2026
Merged

lana-20 merged 1 commit into
mainfrom
web-locators

Conversation

@lana-20

@lana-20 lana-20 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Locators worked only on native screens: inside a WebView every action took a ref and nothing else, so a `mobium test` file, which has no refs, could not touch a page. This is ROADMAP locators item 4.

  • `css=` with a selector, optionally after a frame's path as `map` prints it (`css=iframe#f >> #id`).
  • text, label, testid, role and class, matched against the page map by a native locator's rules: a quoted value is the whole text, a whole match is preferred among several, and `,nth=` counts down the page.
  • The element found goes through every check a web action already makes. `within` and `path` are refused there as unsupported, naming `css=`.
  • CHALLENGES 312: in a WebView, `find` read the native screen and listed the app's Back button. It now matches the page's elements and gives each the ref `map` gives it, which also fixes the inspector's Find.
  • A refusal among look-alikes names each one's frame. A selector written without its frame is answered with the path that reaches what it matched.

Checked on MobiumApp, each tap judged by what the page said it reached, on the Android 15 emulator and the iPhone 17 Pro simulator:

  • Actionability page: 19 of 19 cases on each device.
  • Frames page: taps by path reached the same-origin, nested and cross-origin frames on each device.

`wait` inside a WebView is still refused; ROADMAP has it as the next step. `make ci` passes.

… and find answering from the page (CHALLENGES 312)
@lana-20
lana-20 merged commit 5f9c205 into main Oct 13, 2026
3 checks passed
@lana-20
lana-20 deleted the web-locators branch October 13, 2026 01:20
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.

1 participant