Skip to content

Capabilities ​

Static capabilities of the tvOS driver. A connected toets SDK adds its own (sync.idle, media.state, app.state, ...).

CapabilitySupportedHow
key.back, key.home, key.media.toggleyesSiri Remote buttons, see remote
key.longpressyesXCUIRemote press with duration
screenshot.elementyesviewport screenshot cropped to the element's frame
logsyesapp's unified log (log stream), filtered to its process
videoyessimctl io recordVideo, H.264 MP4 in the artifacts dir
key.menu, key.info, key.media.discrete, key.media.seek, key.media.track, key.color, key.numeric, key.channelnono such button
platform.eventsnonot provided by the driver
text.inputyesXCUITest typeText into the focused text field (\b erases, \n submits), after SELECT opened the fullscreen keyboard ("Enter New..." is picked in the previously-used-emails list, and the text typed back); fill closes the keyboard with Menu
deeplink.launch, deeplink.openyesthe URL opened in the app through XCTest (XCUIApplication.open, no "Open in ...?" prompt); launches put the payload in the app's user defaults; a scheme missing from the app's CFBundleURLTypes fails with DEEPLINK_UNHANDLED
tree.hierarchynoXCUITest flattens plain containers (below); the SDK tree nests
network.mockcoregranted by the core when toets.mock is on (the simulator shares the host network)

Element mapping ​

One page source fetch (WebDriverAgent JSON) per query, focused or tree call:

ElementSnapshotFrom
testIdaccessibilityIdentifier (never the label fallback XCUITest calls name)
labelaccessibility label
textaccessible element or StaticText: its label; others: own label + children's text, without repeating the own label
focusedhasFocus, deepest focused element only; ancestors get focusWithin
selectedSelected accessibility trait
enabled, bounds, visibleXCUITest isEnabled, frame (points), isVisible + non-zero size; flattened views (below): non-zero size inside the viewport
busya visible activity indicator in the subtree
focusablefocusable control types, Button/Link traits, accessible Other views (React Native touchables), or focused now (heuristic)

XCUITest flattens a React Native view that has a testID but is not accessible (a screen, a rail) into a childless Other element, and reports it invisible. toets treats it as visible when it has a size and lies in the viewport, but its children are siblings elsewhere in the tree: scoping a locator into it or toHaveFocusWithin on it only works with the toets SDK connected.

Latency ​

Every read is one HTTP round trip to WebDriverAgent plus a snapshot of the accessibility tree, so its cost grows with the number of elements on screen; keep screens lean and avoid reading in tight loops (the core's retry engine already paces reads). A press returns once XCUIRemote delivered it; the focus change lands a frame or more later.

Measured on an Apple Silicon Mac, Xcode 27.2, Apple TV 4K (3rd generation) (at 1080p) simulator, tvOS 27.2, prebuilt WebDriverAgent cached:

Actionp50p90
query / focused / tree, 29 elements~110ms~150ms
query / focused / tree, 95 elements~255ms~260ms
press~235ms
press with holdMs: 1500~1.73s
screenshot~60-120ms
element screenshot~165ms
launch (terminate + launch)~1.45s
terminate~1.1s
reset (app not running)~15ms
start (booted simulator)~4.2s

29 elements is the Swift fixture app, 95 the React Native example's home screen. A press is one XCUIRemote press, ~235ms whatever its duration. The integration test prints p50/p90/max per action on your machine:

sh
TOETS_TVOS_UDID=<udid> pnpm --filter @toets/driver-tvos test test/integration

The full stack (@toets/test on the fixture app) runs with TOETS_TVOS_UDID=<udid> (external) or TOETS_TVOS_MANAGED=1 (managed provider):

sh
TOETS_TVOS_MANAGED=1 pnpm --filter @toets/test exec vitest run test/tvos.test.ts