Playwright
Playwright module provides a method to launch a browser instance. The following is a typical example of using Playwright to drive automation:
- playwright.chromium
- playwright.devices
- playwright.errors
- playwright.firefox
- playwright.selectors
- playwright.webkit
#
playwright.chromium- type: <BrowserType>
This object can be used to launch or connect to Chromium, returning instances of ChromiumBrowser.
#
playwright.devices- type: <Object>
Returns a dictionary of devices to be used with browser.newContext([options]) or browser.newPage([options]).
#
playwright.errors- type: <Object>
TimeoutError
<function> A class of TimeoutError.
Playwright methods might throw errors if they are unable to fulfill a request. For example, page.waitForSelector(selector[, options]) might fail if the selector doesn't match any nodes during the given timeframe.
For certain types of errors Playwright uses specific error classes. These classes are available via playwright.errors
.
An example of handling a timeout error:
#
playwright.firefox- type: <BrowserType>
This object can be used to launch or connect to Firefox, returning instances of FirefoxBrowser.
#
playwright.selectors- type: <Selectors>
Selectors can be used to install custom selector engines. See Working with selectors for more information.
#
playwright.webkit- type: <BrowserType>
This object can be used to launch or connect to WebKit, returning instances of WebKitBrowser.