Skip to content

API coverage ​

This page lists Playwright's library API class by class and marks what @povio/lightning-panda/playwright implements. Use it to check whether a suite depends on something missing before you migrate.

How this was derived. The tables come from reading the classes in packages/lightning-panda/src/playwright/ (page.ts, browser.ts, handles.ts, request.ts, clock.ts, coverage.ts, cdp-session.ts, index.ts) at version 0.0.33 and comparing their methods with Playwright's documented API. Many entries were also checked by running scripts against the published 0.0.33 package. The test runner and expect are covered in Fixtures, hooks and steps, Config and the test runner and Assertions.

Legend. Supported: works as in Playwright. Partial: works with the limits noted. No-op: exists and does nothing. Not supported: missing (a type error, and undefined at run time) or throws.

Module exports ​

ExportStatusNotes
test, expect, defineConfigSupportedSee the runner pages.
chromiumPartiallaunch, connectOverCDP, connect, name.
firefox, webkit, _android, _electronNot supported
requestSupportedrequest.newContext().
devicesPartialFive descriptors: Desktop Chrome, Desktop Chrome HiDPI, Desktop Edge, Pixel 7, iPhone 15.
errorsPartialerrors.TimeoutError only.
selectorsPartialsetTestIdAttribute() is a no-op (use the testIdAttribute option); register() throws.
Types (Page, Locator, BrowserContext, PlaywrightTestConfig, ...)SupportedPlaywright's shapes.

BrowserType (chromium) ​

MethodStatusNotes
launch(options)PartialLaunches the bundled Lightningpanda. Takes bin, args (serve flags) and boot. Playwright's launch options (headless, executablePath, proxy, ...) are ignored.
connectOverCDP(endpoint)SupportedA ws:// URL or http://host:port of a running lightningpanda serve. timeout and headers are ignored.
connect(wsEndpoint)PartialSame as connectOverCDP; there is no Playwright server protocol.
name()Supported'chromium'.
launchPersistentContext, launchServer, executablePathNot supported

Browser ​

MethodStatusNotes
newContext(options)SupportedIn a test, starts from the test's use options. See Context options.
newPage(options)SupportedA page in its own context, closed with the page.
contexts(), isConnected(), close()Supported
version()PartialReturns 'lightningpanda'.
browserType()Partial{ name: () => 'chromium' }.
on/once/off('disconnected')Supported
newBrowserCDPSession(), startTracing(), stopTracing(), removeAllListeners()Not supported

BrowserContext ​

MethodStatusNotes
newPage(), pages(), browser(), close()Supported
addInitScript(script, arg)SupportedFunction, string, { path } or { content }.
addCookies(), cookies(urls)SupportedA cookie needs url or domain.
clearCookies(options)PartialClears all cookies; filter options are ignored.
storageState({ path })PartiallocalStorage only of origins with an open page; indexedDB is not saved.
route(), unroute(), unrouteAll()SupportedunrouteAll's behavior is ignored.
routeFromHAR(path, options)SupportedReplay, and recording with update: true.
routeWebSocket()Not supported
exposeFunction(), exposeBinding()SupportedBinding source frame is the main frame.
setExtraHTTPHeaders()Supported
setDefaultTimeout(), setDefaultNavigationTimeout()Supported
newCDPSession(pageOrFrame)SupportedLightningpanda's CDP.
requestPartialDoes not share cookies with the context.
clockSupported
tracingNo-opstart, stop, startChunk, stopChunk, group, groupEnd.
waitForEvent(event, options)SupportedDefault timeout 30 s.
on/once/offPartialEvents page, close, console, request, response, requestfinished, requestfailed. No dialog, weberror, serviceworker, backgroundpage.
grantPermissions(), clearPermissions(), setGeolocation(), setOffline()No-op
setHTTPCredentials(), serviceWorkers(), backgroundPages(), removeAllListeners()Not supported

Context options ​

OptionStatus
baseURL, viewport, storageState, extraHTTPHeaders, userAgent, colorScheme, reducedMotion, acceptDownloads, recordHarSupported
httpCredentials, ignoreHTTPSErrorsPartial: applied to context.request only
screen, forcedColors, bypassCSP, deviceScaleFactor, geolocation, hasTouch, isMobile, javaScriptEnabled, locale, offline, permissions, proxy, serviceWorkers, strictSelectors, timezoneId, recordVideoAccepted, no effect

Page ​

MethodStatusNotes
goto(url, options)PartialwaitUntil (load, domcontentloaded, commit as domcontentloaded, networkidle), timeout. The returned Response has URL and status only; null on a booted page. referer is ignored.
reload()PartialSame response limits as goto.
goBack(), goForward()PartialReturn null.
url(), title(), content(), setContent()Supported
locator(), getByRole(), getByText(), getByLabel(), getByPlaceholder(), getByAltText(), getByTitle(), getByTestId(), frameLocator()SupportedgetByAltText, getByTitle, getByTestId: strings only.
evaluate(), evaluateHandle()SupportedHandles in arguments work.
$(), $$(), $eval(), $$eval()Supported
waitForSelector()SupportedStates attached, detached, visible, hidden.
waitForFunction(fn, arg, options)Partialpolling in ms; 'raf' polls every 16 ms.
waitForLoadState(), waitForURL(), waitForTimeout()Supported
waitForRequest(), waitForResponse(), waitForEvent()Supported
route(), unroute(), unrouteAll(), routeFromHAR()Supported
routeWebSocket()Not supported
on/once/off/addListener/removeListener/removeAllListenersSupportedEvents below.
mainFrame(), frames(), frame(nameOrOptions)Supported
context(), isClosed(), close()SupportedrunBeforeUnload is ignored.
keyboard, mouseSupportedSee below.
touchscreenNot supported
clock, coverageSupportedSee Clock, coverage, ARIA.
requestPartialThe context's request; separate cookies.
addInitScript()Supported
addScriptTag(), addStyleTag()PartialReturn null instead of an element handle.
exposeFunction(), exposeBinding()Supported
setExtraHTTPHeaders()Supported
setViewportSize(), viewportSize()Supported
emulateMedia()PartialcolorScheme, reducedMotion, media; forcedColors is ignored.
screenshot()Partialpath, fullPage, clip, type, quality. Rendered by Lightningpanda.
pdf()PartialOptions go to CDP Page.printToPDF unchanged (paperWidth, marginTop, ... in inches).
ariaSnapshot()SupportedIncludes mode: 'ai'.
workers()Supported
setDefaultTimeout(), setDefaultNavigationTimeout()Supported
opener()PartialAlways null.
video()PartialAlways null.
bringToFront(), pause()No-op
click(), dblclick(), fill(), type(), press(), check(), uncheck(), setChecked(), hover(), tap(), focus(), selectOption(), setInputFiles(), dispatchEvent(), dragAndDrop(), textContent(), innerText(), innerHTML(), inputValue(), getAttribute(), isVisible(), isHidden(), isEnabled(), isDisabled(), isChecked(), isEditable() (selector-first forms)Not supportedUse locators.
waitForNavigation(), accessibilityNot supportedDeprecated in Playwright.
addLocatorHandler(), removeLocatorHandler(), requestGC(), consoleMessages(), pageErrors(), requests()Not supported

Page events. Supported: close, console, dialog, domcontentloaded, download, filechooser, frameattached, framedetached, framenavigated, load, pageerror, popup, request, requestfailed, requestfinished, response, websocket, worker. Not supported: crash.

Frame ​

MethodStatusNotes
locator(), getBy*(), frameLocator()Supported
url(), name(), page(), parentFrame(), childFrames(), isDetached(), frameElement()Supported
goto()PartialOn a child frame, sets location.href and returns null.
evaluate(), evaluateHandle(), content(), title()PartialChild frames run through the <iframe> element's window: cross-origin frames fail.
waitForLoadState(), waitForURL(), waitForSelector(), waitForFunction(), waitForTimeout()Supported
$(), $$(), $eval(), $$eval()Supported
addScriptTag(), addStyleTag(), setContent()Not supported
Selector-first action and read methods (click(), fill(), ...)Not supportedUse locators.
waitForNavigation()Not supportedDeprecated.

Locator ​

MethodStatusNotes
locator(), getBy*(), frameLocator(), contentFrame(), page()Supported
filter()Supportedhas, hasNot, hasText, hasNotText, visible.
and(), or()SupportedBoth locators in the same frame.
nth(), first(), last(), all(), count()Supported
click(), dblclick()PartialclickCount 1 or 2; delay ignored.
tap()PartialA click.
hover()Supported
fill(), clear(), press(), pressSequentially()Partialdelay and force ignored.
check(), uncheck(), setChecked()Partialforce ignored.
selectOption(), setInputFiles(), focus(), blur(), dispatchEvent(), scrollIntoViewIfNeeded(), selectText()Supported
dragTo(target)Partialtimeout only; position options ignored.
textContent(), innerText(), innerHTML(), inputValue(), getAttribute(), allTextContents(), allInnerTexts(), boundingBox()Supported
isVisible(), isHidden(), isEnabled(), isDisabled(), isChecked(), isEditable()Supported
evaluate(), evaluateAll(), evaluateHandle(), elementHandle(), elementHandles()Supported
waitFor()Supported
ariaSnapshot()Supportedmode: 'ai', depth.
screenshot()PartialPage screenshot clipped to the bounding box.
highlight()No-op
describe()Not supported
type()Not supportedDeprecated in Playwright.

FrameLocator ​

MethodStatusNotes
locator(), getBy*(), frameLocator(), owner()Supported
first(), last(), nth()Not supportedDeprecated in Playwright.

ElementHandle ​

MethodStatusNotes
click(), dblclick(), tap(), hover(), fill(), press(), pressSequentially(), check(), uncheck(), setChecked(), focus(), selectOption(), selectText(), setInputFiles(), dispatchEvent(), screenshot()SupportedNative actions; the element carries data-lp-handle meanwhile. Same option limits as Locator.
isVisible(), isHidden(), isEnabled(), isDisabled(), isEditable(), isChecked(), inputValue()Supported
getAttribute(), textContent(), innerText(), innerHTML(), boundingBox()Supported
ownerFrame(), contentFrame(), scrollIntoViewIfNeeded()Supported
waitForElementState(state)Partialstable returns at once.
$(), $$(), $eval(), $$eval()PartialCSS selectors only.
waitForSelector()Not supported
type()Not supportedDeprecated.
JSHandle methodsSupportedSee below.

JSHandle ​

MethodStatus
evaluate(), evaluateHandle(), jsonValue(), getProperty(), getProperties(), asElement(), dispose(), [Symbol.asyncDispose]Supported

Request ​

MethodStatusNotes
url(), method(), headers(), allHeaders(), headerValue(), postData(), postDataBuffer(), postDataJSON(), resourceType(), isNavigationRequest(), response(), failure(), redirectedFrom(), redirectedTo()SupportedallHeaders() equals headers().
frame()PartialAlways the main frame.
timing()PartialEvery field is -1.
headersArray(), sizes(), serviceWorker()Not supported

Response ​

MethodStatusNotes
url(), status(), statusText(), ok(), headers(), allHeaders(), headerValue(), request(), frame(), finished()Supported
body(), text(), json()PartialNot on the response goto() returns.
headersArray(), headerValues(), securityDetails(), serverAddr(), fromServiceWorker()Not supported

Route ​

MethodStatusNotes
request(), continue(), abort(), fallback()Supported
fulfill()Supportedstatus, headers, contentType, body, json, path, response.
fetch()PartialRuns from the test process; timeout ignored.

Download ​

MethodStatusNotes
page(), url(), suggestedFilename(), path(), saveAs(), failure(), createReadStream(), delete()Supported
cancel()No-op

Dialog ​

MethodStatusNotes
type(), message(), defaultValue(), page(), accept(), dismiss()SupportedWithout a listener, dialogs are dismissed.

ConsoleMessage ​

MethodStatusNotes
type(), text(), location(), page()Supported
args()PartialAlways an empty list.

Worker ​

MethodStatus
url(), evaluate(), evaluateHandle(), isClosed(), on/once/off('close'), waitForEvent()Supported

FileChooser ​

MethodStatus
page(), element(), isMultiple(), setFiles()Supported

WebSocket ​

MethodStatusNotes
url(), isClosed(), waitForEvent(), on/once/off/addListener/removeListener/removeAllListenersSupportedEvents framesent, framereceived, socketerror, close.
waitForFrameSent(), waitForFrameReceived()Supported

APIRequestContext and APIResponse ​

MethodStatusNotes
get(), post(), put(), patch(), delete(), head(), fetch()Partialparams, headers, data, form, multipart, timeout, failOnStatusCode, ignoreHTTPSErrors, maxRedirects (0 or follow). maxRetries ignored.
storageState()PartialCookies only.
dispose()Supported
APIResponse: url(), status(), statusText(), ok(), headers(), headersArray(), body(), text(), json(), dispose()Supported

Keyboard ​

MethodStatusNotes
press(), type(), insertText()PartialAct on the focused element; delay ignored.
down(), up()SupportedHeld modifiers apply to later clicks and presses.

Mouse ​

MethodStatus
click(), dblclick(), move(), down(), up(), wheel()Supported

Touchscreen ​

MethodStatus
tap()Not supported

Clock ​

MethodStatus
install(), fastForward(), runFor(), pauseAt(), resume(), setFixedTime(), setSystemTime()Supported

Coverage ​

MethodStatusNotes
startJSCoverage(), stopJSCoverage()PartialSee caveats.
startCSSCoverage(), stopCSSCoverage()SupportedSheets without a URL are not reported.

CDPSession ​

MethodStatusNotes
send(), on(), once(), off(), addListener(), removeListener(), detach()SupportedLightningpanda's CDP domains. See CDP coverage.

Not present at all ​

Tracing files, video recording, the HTML reporter, the trace viewer, codegen, the inspector, UI mode, component testing, Android and Electron automation, and Firefox and WebKit browsers.

AGPL-3.0-only. A derivative of Lightpanda. Built by Povio.