github doronz88/pymobiledevice3 v11.4.2

2 hours ago

Highlights

🐛 Playwright and Puppeteer can now interact with child frames

v11.4.0 shipped two of these as known limitations. Both turned out to be defects in the bridge rather than platform limits, and both are fixed here.

Locator interaction inside a child frameframeLocator(...).locator(...).click() and .evaluate() retried until they timed out. Acting on an element through a locator goes through node identity: a client describes the element to get a backendNodeId, then resolves that id back to an object. DOM.describeNode reported no usable id, so the resolve found nothing. WebKit has no node identity that outlives a description, so one is kept by the bridge — and resolving now answers with a handle of its own, because a client releases the handle it described from (#1910).

fill() into a cross-origin frame reported success and left the field empty. Chrome names the user-gesture flag userGesture and WebKit names it emulateUserGesture; an unrecognized parameter is ignored, so every call a client marked as a user gesture reached the page without one. An element inside a cross-origin frame cannot be focused without a gesture, and fill() focuses the field before typing — so it typed nowhere.

Verified against a device with three cross-origin iframes, one nested a further level down:

cross-origin frame.fill()                  : the value lands in the field   (was: empty)
frameLocator(...).fill()                   : the value lands in the field   (was: empty)
frameLocator(...).click()                  : the child page really reacts   (was: timeout)
frameLocator(...).locator(...).evaluate()  : returns the element's data     (was: timeout)

📚 Driving a device from Playwright or Puppeteer is documented

WebView debugging now covers test automation, not just Chrome DevTools and VS Code — a runnable connectOverCDP example, the supported surface, and the things worth knowing when scripting over USB (the first interaction with a new frame is slow while the client bootstraps inside it; per-call latency favours a few coarse evaluate() calls over many fine-grained ones).

pymobiledevice3 webinspector cdp
const browser = await chromium.connectOverCDP('http://127.0.0.1:9222');
const page = browser.contexts()[0].pages()[0];
await page.locator('#card-number').fill('4111111111111111');
await page.screenshot({ path: 'device.png' });

📝 Remaining known limitation

A page whose framework replaces the global Promise and minifies the replacement (Angular with zone.js, for instance) reports objects of that class without the promise subtype, because built-ins are recognised by class name. await still behaves; only code that inspects the subtype is affected.

What's Changed

Thanks to @ammar01, whose reports and repeated retesting on real hardware drove this whole series — including the two diagnoses that led straight to these fixes.

Full Changelog: v11.4.1...v11.4.2

Don't miss a new pymobiledevice3 release

NewReleases is sending notifications on new releases.