0.0.1 • Published 3 years ago

@dlenroc/appium-playwright-driver v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Playwright Driver · NPM Version Node.js Version Node.js CI

Appium Playwright is a W3C WebDriver that allows you to use Playwright through any WebDriver client. If you are interested in the project Star-it, or if you have found a problem, please report or suggest a solution for it

Installation

Install playwright (if not installed)

npm install -g playwright

Install playwright-driver driver

npx appium@next driver install --source npm @dlenroc/appium-playwright-driver

# Output
#   Driver playwright@<versio> successfully installed
#     - automationName: Playwright
#     - platformNames: ["chromium","firefox","webkit"]

Run Appium

npx appium@next server

# Output:
#   Appium REST http interface listener started on 0.0.0.0:4723
#   Available drivers:
#     - playwright@<version> (automationName 'Playwright')

Capabilities

Appium Capabilities

CapabilityRequiredTypeDescription
appium:automationName+stringMust be playwright

W3C Capabilities

CapabilityRequiredTypeDescription
platformName+stringMust be chromium, firefox or webkit
acceptInsecureCerts-booleanIndicates whether untrusted and self-signed TLS certificates are implicitly trusted on navigation
pageLoadStrategy-stringDefines the current session’s page load strategyBesides the standard values, it also supports networkidle
timeouts-objectDescribes the timeouts imposed on certain session operations
unhandledPromptBehavior-stringDescribes prompt handlerDefault: dismiss and notify

Playwright Capabilities

CapabilityRequiredTypeDescription
playwright:browser-objectBrowser launch options, see browserType.launch for details
playwright:context-objectBrowser context options, see browser.newContext for details

Commands

CommandRefDescription
activehereGet Active Element
backhereBack
clearhereElement Clear
clickhereElement Click
closeWindowhereClose Window
createSessionhereNew Session
createWindowhereNew Window
deleteCookiehereDelete Cookie
deleteCookieshereDelete All Cookies
deleteSessionhereDelete Session
elementDisplayedhereIs Element Displayed
elementEnabledhereIs Element Enabled
elementSelectedhereIs Element Selected
executehereExecute Script
executeAsynchereExecute Async Script
findElOrElshereFind Elements
forwardhereForward
fullScreenWindowhereFullscreen Window
getAlertTexthereGet Alert Text
getAttributehereGet Element Attribute
getComputedLabelhereGet Computed Label
getComputedRolehereGet Computed Role
getCookiehereGet Named Cookie
getCookieshereGet All Cookies
getCssPropertyhereGet Element CSS Value
getElementRecthereGet Element Rect
getElementScreenshothereTake Element Screenshot
getNamehereGet Element Tag Name
getPageSourcehereGet Page Source
getPropertyhereGet Element Property
getScreenshothereTake Screenshot
getTexthereGet Element Text
getTimeoutshereGet Timeouts
getUrlhereGet Current URL
getWindowHandlehereGet Window Handle
getWindowHandleshereGet Window Handles
getWindowRecthereGet Window Rect
implicitWaitW3ChereSet Implicit Timeout
maximizeWindowhereMaximize Window
minimizeWindowhereMinimize Window
pageLoadTimeoutW3ChereSet Page Load Timeout
parentFramehereSwitch To Parent Frame
performActionsherePerform Actions
postAcceptAlerthereAccept Alert
postDismissAlerthereDismiss Alert
printPageherePrint Page
refreshhereRefresh
releaseActionshereRelease Actions
scriptTimeoutW3ChereSet Script Timeout
setAlertTexthereSend Alert Text
setCookiehereAdd Cookie
setFramehereSwitch To Frame
setUrlhereNavigate To
setValuehereElement Send Keys
setWindowhereSwitch To Window
setWindowRecthereSet Window Rect
titlehereGet Title
uploadFile-Upload File