Permissions
Grant, deny or unset the app's privacy permissions from a spec or a suite before it launches, so the test reaches the screen behind the prompt, or the denied path.
device.permissions sets the app's privacy permissions directly, so a spec does not tap through a system prompt (iOS does not always raise one) and can test the denied path on purpose.
await device.permissions.set({ location: "denied", notifications: "granted" });
await app.open();Set permissions before app.open(): iOS terminates a running app whose permission changes.
| Member | Does |
|---|---|
set({ location?, camera?, photos?, … }, { bundleId? }) | each "granted" | "denied" | "unset" (unset asks again). Returns { bundleId, applied, skipped }; none applicable throws E_UNSUPPORTED. Default app: the suite's |
reset({ bundleId? }) | every name this test set back to the suite's value, else "unset" |
Names: location locationAlways camera photos photosAdd contacts contactsLimited notifications microphone calendar reminders motion mediaLibrary siri. A name the platform or the app cannot take comes back in skipped (which).
In a suite
conditions: { permissions: { location: "denied", camera: "granted" } },Applied before the app launches, and put back after each spec.
By hand with warden ui permission: Permissions on a simulator.
Biometrics
Test Face ID, Touch ID and Android fingerprint unlocks against the real system prompt from a spec - enroll, match, fail, and the biometrics config key.
Camera
Test QR scanning, photo capture and video recording against a known image or video fed into the app's real camera, from a spec or a suite.