Skip to content

fix(wda): reject missing and invalid element bounds - #168

Merged
omnarayan merged 1 commit into
devicelab-dev:mainfrom
s4lmon:fix/wda-stale-element-bounds
Sep 13, 2026
Merged

omnarayan merged 1 commit into
devicelab-dev:mainfrom
s4lmon:fix/wda-stale-element-bounds

Conversation

@s4lmon

@s4lmon s4lmon commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Reject missing or invalid WDA bounds so stale elements retry lookup instead of reporting a tap at (0, 0).

Validated with regression tests, the WDA race suite and iOS picker/negative checks; full checks remain blocked by existing lint/cancellation failures and a browser startup timeout.

@omnarayan

Copy link
Copy Markdown
Contributor

Thanks @s4lmon, this is a real bug and a clean fix.

A /rect failure on a stale element was being swallowed, the bounds stayed at zero, and the tap landed at the screen origin and reported success. Turning that into an error is exactly right: findElementWithContext already treats an error as a retry and re-reads page source until the step timeout, and your test proves both the recovered and the disappeared case.

The zero-size rejection is a small behaviour change worth noting for anyone reading later: an element WDA reports with zero width or height is now "not found" rather than found, so assertVisible on it fails after its timeout and assertNotVisible passes. That is the sensible reading.

Built, vetted and ran the wda package tests locally, all green. The CI failures on this branch are pre-existing on main and unrelated to this change. Merging, this will go out in 1.1.28.

@omnarayan
omnarayan merged commit b0d2603 into devicelab-dev:main Sep 13, 2026
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