# KMPwright - **Get started** - [Introduction](/docs): KMPwright is a Kotlin Multiplatform browser automation library with a Playwright-style API and agent-browser commands for Android WebView, iOS WKWebView and Chromium on the JVM. - [Installation](/docs/installation): Add kmpwright-core (and optionally kmpwright-compose) to a Kotlin Multiplatform, Android, iOS or JVM project, with the minimum versions and threading rules each platform needs. - [Quick start](/docs/quick-start): Attach KMPwright to an Android WebView or iOS WKWebView, or launch Chromium on the JVM, then click, assert, screenshot and run your first agent loop. - [Sample app](/docs/sample-app): The Compose Multiplatform sample puts an agent console, runnable recipes and an inspector next to a live WebView on Android and iOS. - [Coming from Playwright](/docs/coming-from-playwright): A Playwright (JavaScript) to KMPwright mapping for lifecycle, navigation, locators, assertions, network, storage, emulation, input, dialogs, frames, downloads, screenshots and tracing, plus the differences that matter. - [Coming from agent-browser](/docs/coming-from-agent-browser): How agent-browser CLI commands and flags map to page.runCommand (same command grammar) and to the typed Kotlin API, including what is partial, unsupported or intentionally out of scope. - **Agents** - [Build an agent](/docs/agents): Let an LLM drive your app's WebView with one tool backed by page.runCommand, agent-browser's snapshot-and-ref workflow. - [Commands](/docs/agents/commands): Complete reference for page.runCommand, the agent-browser command line that runs in-process against a WebView or Chromium page. - [Snapshots and refs](/docs/agents/snapshots): page.snapshot options, the agent-browser tree format, @eN refs and their lifetime, snapshot diffs, annotated screenshots and backend differences. - [LLM tools](/docs/agents/llm-tools): Expose a KMPwright page to an LLM as one tool-calling function, with sketches for Koog, Firebase AI Logic and OpenAI- or Anthropic-style HTTP APIs. - [Skills for coding agents](/docs/agents/skills): Teach Claude Code, Cursor, Codex and other coding agents to write correct KMPwright code with llms.txt, Markdown pages and the kmpwright skill file. - **Guides** - [Locators](/docs/guides/locators): Find elements with page.locator(selector) and the getBy* finders, compose locators with filter/nth/and/or, and read element state. - [Actions](/docs/guides/actions): Click, fill, type, press, check, select, drag and use the mouse, keyboard and touchscreen, with the auto-wait rules each action applies on every backend. - [Assertions](/docs/guides/assertions): Web-first expect(locator) and expect(page) assertions that retry until they pass or time out with a KmpwrightTimeoutException. - [Navigation and waiting](/docs/guides/navigation): Load pages with goto, reload and history navigation, read the NavigationResult, and wait for URLs, load states, functions, text, selectors and page events without races. - [Screenshots and PDFs](/docs/guides/screenshots): Capture the viewport, the full page, a clip or one element with page.screenshot, render PDFs with page.pdf, and compare images pixel by pixel with VisualDiff. - [Network](/docs/guides/network): Mock, block and rewrite requests with page.route, wait for requests and responses, read the request history and HAR, and set headers, credentials and allowed domains. - [Storage and sessions](/docs/guides/storage): Read and write cookies, localStorage, sessionStorage and the clipboard, and save, encrypt and restore a signed-in session with StorageState. - [Dialogs and frames](/docs/guides/dialogs-and-frames): Answer alert, confirm, prompt and beforeunload dialogs with onDialog, wait for dialogs without races, and locate elements inside iframes with frameLocator. - [Emulation](/docs/guides/emulation): Emulate color scheme, geolocation, offline mode, network throttling, viewport, user agent, device scale factor and device presets, with what each backend does natively and what it fakes in JavaScript. - [Accessibility audits](/docs/guides/accessibility): Run the bundled axe-core 4.14.0 against the current page with accessibilityAudit and read violations, incomplete checks and frame coverage. - [Reading, vitals, React and WebMCP](/docs/guides/reading): Fetch pages as Markdown with page.read and HttpReader, measure Core Web Vitals, inspect React component trees, and call WebMCP tools exposed by a page. - [Recording, tracing and profiling](/docs/guides/recording): Record page video with an optional cursor and contact sheet, stream screencast frames, capture Chrome performance traces and V8 CPU profiles; all JVM (CDP) only. - [Compose](/docs/guides/compose): Host an automated WebView in Jetpack Compose with the kmpwright-compose module, or share one WebView across Android and iOS in Compose Multiplatform with AndroidView and UIKitView. - **Platforms** - [Android](/docs/platforms/android): Drive an Android WebView with KMPwright, including attaching to your own WebView, threading, client forwarding, renderer crashes, screenshots and the limits of WebView interception. - [iOS](/docs/platforms/ios): Drive a WKWebView with KMPwright on iOS, including IOSPlatformContext, threading, calling from Swift, delegate ownership, network interception limits, the domain filter and screenshots. - [JVM](/docs/platforms/jvm): Run KMPwright on the JVM against Chromium over CDP, by launching a local Chrome, connecting to an existing endpoint or a cloud provider, plus tabs, windows, browser farms and certificate trust. - [Capabilities](/docs/platforms/capabilities): How each backend reports what it supports through PageCapabilities, how to fail fast with requireCapabilities, and the full support matrix for Android WebView, iOS WKWebView and JVM Chromium. - **Reference** - [Configuration](/docs/reference/configuration): Every field of KmpwrightConfig and its nested types (TimeoutConfig, DebugConfig, CdpConfig, ProxyConfig, Viewport, IosSchemeInterceptionConfig) and the per-page ActionPolicy, with defaults and what each one actually changes. - [Page](/docs/reference/page): Complete reference of the Page interface and its public extension functions (selector conveniences, action-scoped waits, dialogs, tabs, agent commands), with every parameter and its default. - [Locator](/docs/reference/locator): Complete reference of Locator, FrameLocator and ElementFinder (locator, frameLocator, getBy*), the selector engines, actionability checks, and every action parameter. - [Assertions](/docs/reference/assertions): Complete reference of expect(locator) and expect(page) - every LocatorAssertions and PageAssertions matcher, how each one compares, the retry schedule, negation and failure messages. - [Errors](/docs/reference/errors): The exception types KMPwright throws, which failures are returned instead of thrown, and what the common error messages (actionability, selectors, stale refs, crashes, policies, origins, capabilities) mean. - [Security](/docs/security): Limit what automation and agents can do with KmpwrightConfig origin rules and switches, action policies with confirmation, allowed domains, content boundaries, encrypted storage state, and the hardened in-page runtime. - [Changelog](/docs/changelog): Release notes for KMPwright, starting with the unreleased 0.0.1 alpha.