Package com.microsoft.playwright
package com.microsoft.playwright
-
ClassDescriptionExposes API that can be used for the Web API testing.This API is used for the Web API testing.
APIResponseclass represents responses returned byAPIRequestContext.get()and similar methods.A Browser is created viaBrowserType.launch().BrowserContexts provide a way to operate multiple independent browser sessions.BrowserType provides methods to launch a specific browser instance or connect to an existing one.TheCDPSessioninstances are used to talk raw Chrome Devtools Protocol: protocol methods can be called withsession.sendmethod. protocol events can be subscribed to withsession.onmethod.Use this class to launch playwright cli.ConsoleMessageobjects are dispatched by page via thePage.onConsoleMessage()event.Dialogobjects are dispatched by page via thePage.onDialog()event.Downloadobjects are dispatched by page via thePage.onDownload()event.ElementHandle represents an in-page DOM element.FileChooserobjects are dispatched by the page in thePage.onFileChooser()event.At every point of time, page exposes its current frame tree via thePage.mainFrame()andFrame.childFrames()methods.FrameLocator represents a view to theiframeon the page.JSHandle represents an in-page JavaScript object.Keyboard provides an api for managing a virtual keyboard.Locators are the central piece of Playwright's auto-waiting and retry-ability.The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.Page provides methods to interact with a single tab in aBrowser, or an extension background page in Chromium.Playwright module provides a method to launch a browser instance.PlaywrightException is thrown whenever certain operations are terminated abnormally, e.g.Whenever the page sends a request for a network resource the following sequence of events are emitted byPage:Page.onRequest()emitted when the request is issued by the page.Page.onResponse()emitted when/if the response status and headers are received for the request.Page.onRequestFinished()emitted when the response body is downloaded and the request is complete.Responseclass represents responses which are received by page.Whenever a network route is set up withPage.route()orBrowserContext.route(), theRouteobject allows to handle the route.Selectors can be used to install custom selector engines.TimeoutError is emitted whenever certain operations are terminated due to timeout, e.g.The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport.API for collecting and saving Playwright traces.When browser context is created with therecordVideooption, each page has a video object associated with it.WebErrorclass represents an unhandled exception thrown in the page.TheWebSocketclass represents websocket connections in the page.TheWebSocketFrameclass represents frames sent overWebSocketconnections in the page.The Worker class represents a WebWorker.