Skip to content

Native browser actions

Interactor’s click, type, press, and assertions run directly in the browser. Use press for app-defined keyboard handlers, such as chart arrows or search shortcuts. These don’t need a driver.

Use a custom Interactor action with the element’s scrollBy or scrollTo for scrolling. App scroll handlers and lazy loading still run in the real browser.

Use native input when you’re testing browser defaults that synthetic events don’t reproduce, such as Tab navigation or CSS hover.

await I.find('Name').then.focus();
await I.nativePress('Tab');
await I.find('Notes').focused();
await I.find('Account menu').then.nativeHover();
await I.nativeMove({ x: 0, y: 0 });

These work with scopes and custom interactors. nativePress uses the focused element; it doesn’t focus a selector for you. Hover scrolls to a visible point that receives pointer input. Stale or covered targets fail. After an action navigates, assert on the destination with Interactor.

Use setColorScheme('dark' | 'light' | 'no-preference') for system appearance. blockExternalRequests() blocks app-page HTTP requests outside the gateway origin and records up to 1,000 recent URLs; blockedRequests() returns them. It doesn’t block WebSockets, service-worker traffic, or companion requests. Both settings reset between tests.

await app.native.withDialog({
action: 'accept',
message: 'Delete this note?',
}, async () => {
await I.click('Delete');
});

The optional message must match exactly. You can also dismiss a dialog or supply prompt text. Await the scope, including when the callback navigates; it returns the callback’s result.

app.native.capabilities tells you what this browser supports. Required calls fail when unavailable. Manual runs have no native capabilities; managed support varies by engine. See the browser support table.

Use grantPermissions([...]), enableVirtualAuthenticator(), disableVirtualAuthenticator(), setOffline(boolean), or setReducedMotion('reduce' | 'no-preference') before or after navigation. State resets before the next test, including after failure. Failed cleanup ends the managed session, and each operation appears in timings.

Virtual authenticators and app offline require Chromium. Your app still performs real passkey registration and validation. Offline keeps companion HTTP connected, but Chromium can change its navigator.onLine too; this isn’t fully isolated offline state.

app.native.consoleMessages() returns up to 100 recent entries with increasing id, type, and text (up to 4,000 characters). Save the highest ID before a workflow to find newer messages. Browser-generated warnings are included; these entries aren’t automatically copied to reports.