Skip to content

Set up Web Inspector for Device Lab reads

Published

An instrumented read, confidence label A, is an agent-measured read stored verbatim in the data package’s raw/ folder (report, sections 5.2 and 5.4). In the 2026-10-20 run the reads came over the Web Inspector protocol, except some tab values read through WebDriver (safaridriver). To read through Web Inspector, connect the device to a Mac with a cable, then read the Safari tab and Home Screen app separately. Apple’s reference is Inspecting iOS and iPadOS (developer.apple.com); the panels themselves are described in Web Inspector (webkit.org).

  1. On the iPhone, open Settings > Apps > Safari > Advanced and turn on Web Inspector.
  2. On the Mac, open Safari > Settings > Advanced and turn on Show features for web developers. The Develop menu appears (Enabling Developer Features, developer.apple.com).
  3. Connect the iPhone by cable, unlock it and tap Trust if it asks.
  4. In Safari on the Mac, open Develop > your iPhone’s name. Open Safari tabs and running Home Screen web apps are listed; service workers may be listed as separate entries. Choose one to open its console.

If a page you need is not listed, record could-not-run (not inspectable) for that step and continue. Note the Mac’s macOS and Safari versions in the environment block.

To take a read, run a probe snippet in the page’s console and save its output. Use the probe scripts the Lab published with its data, in tools/ of the iOS 18.6.2 data package, or the harness page’s own panel. Paste the probe, run it, and save the console output as a file named after the step, the context and the page, for example <date>-<os>-<step>-app-lab.json. Record the time of each read in UTC.

Open the harness page in Safari, then choose it under Develop > your iPhone’s name. The tab is listed under Safari. Tab-side results are labelled tab.

Launch the app from its icon and keep it in the foreground. A Home Screen web app runs in its own process, so it is listed as its own entry, apart from Safari. Pages can be read only while they are in the foreground; if the phone locks or the app goes to the background, bring it back before you read. App-side results are labelled app.

The probes are read-only. They evaluate feature detects, matchMedia queries, geometry and storage contents, and do not call requestPermission(), subscribe(), share(), install(), register() or persist(). Permission and subscription changes therefore come from the operator’s taps on harness buttons, and the record shows which step caused them. The harness pages still do their own work when they load, such as registering their service worker. A read still runs JavaScript in the page (a hidden element for env() insets, a temporary property); the methodology page lists that as a threat to validity.

For scripted reads, the Lab used ios_webkit_debug_proxy (github.com) for the WebKit remote inspector protocol and safaridriver for automated tab reads. A safaridriver session opens an automation window with its own empty website data, so no storage result should come from it. Close any Mac Web Inspector window attached to the phone before a scripted read.

Push subscriptions are read as endpoint host only; the probes print web.push.apple.com and drop the path and keys. Redact other sites’ URLs from any list of inspectable pages before you keep it, and keep the device UDID, serial number and account names out of saved files and scripts. Fill in the environment block (see the iPhone and iPad guide) and compare the served files with /lab/harness/v1/SHA256SUMS.txt before and after the run. Reset to fresh state (remove the icon, clear website data) where a test asks for it.

Device steps performed by an OpenPWA operator on an iPhone 16 Pro. AI agent sessions read page state over USB, kept the notebook and drafted this text; automated gates and an AI fact-check checked it. No person reviews each entry.