0.0.1 • Published 3 years ago
@dlenroc/appium-playwright-driver v0.0.1
Playwright Driver ·
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
Capability | Required | Type | Description |
---|---|---|---|
appium:automationName | + | string | Must be playwright |
W3C Capabilities
Capability | Required | Type | Description |
---|---|---|---|
platformName | + | string | Must be chromium , firefox or webkit |
acceptInsecureCerts | - | boolean | Indicates whether untrusted and self-signed TLS certificates are implicitly trusted on navigation |
pageLoadStrategy | - | string | Defines the current session’s page load strategyBesides the standard values, it also supports networkidle |
timeouts | - | object | Describes the timeouts imposed on certain session operations |
unhandledPromptBehavior | - | string | Describes prompt handlerDefault: dismiss and notify |
Playwright Capabilities
Capability | Required | Type | Description |
---|---|---|---|
playwright:browser | - | object | Browser launch options, see browserType.launch for details |
playwright:context | - | object | Browser context options, see browser.newContext for details |
Commands
Command | Ref | Description |
---|---|---|
active | here | Get Active Element |
back | here | Back |
clear | here | Element Clear |
click | here | Element Click |
closeWindow | here | Close Window |
createSession | here | New Session |
createWindow | here | New Window |
deleteCookie | here | Delete Cookie |
deleteCookies | here | Delete All Cookies |
deleteSession | here | Delete Session |
elementDisplayed | here | Is Element Displayed |
elementEnabled | here | Is Element Enabled |
elementSelected | here | Is Element Selected |
execute | here | Execute Script |
executeAsync | here | Execute Async Script |
findElOrEls | here | Find Elements |
forward | here | Forward |
fullScreenWindow | here | Fullscreen Window |
getAlertText | here | Get Alert Text |
getAttribute | here | Get Element Attribute |
getComputedLabel | here | Get Computed Label |
getComputedRole | here | Get Computed Role |
getCookie | here | Get Named Cookie |
getCookies | here | Get All Cookies |
getCssProperty | here | Get Element CSS Value |
getElementRect | here | Get Element Rect |
getElementScreenshot | here | Take Element Screenshot |
getName | here | Get Element Tag Name |
getPageSource | here | Get Page Source |
getProperty | here | Get Element Property |
getScreenshot | here | Take Screenshot |
getText | here | Get Element Text |
getTimeouts | here | Get Timeouts |
getUrl | here | Get Current URL |
getWindowHandle | here | Get Window Handle |
getWindowHandles | here | Get Window Handles |
getWindowRect | here | Get Window Rect |
implicitWaitW3C | here | Set Implicit Timeout |
maximizeWindow | here | Maximize Window |
minimizeWindow | here | Minimize Window |
pageLoadTimeoutW3C | here | Set Page Load Timeout |
parentFrame | here | Switch To Parent Frame |
performActions | here | Perform Actions |
postAcceptAlert | here | Accept Alert |
postDismissAlert | here | Dismiss Alert |
printPage | here | Print Page |
refresh | here | Refresh |
releaseActions | here | Release Actions |
scriptTimeoutW3C | here | Set Script Timeout |
setAlertText | here | Send Alert Text |
setCookie | here | Add Cookie |
setFrame | here | Switch To Frame |
setUrl | here | Navigate To |
setValue | here | Element Send Keys |
setWindow | here | Switch To Window |
setWindowRect | here | Set Window Rect |
title | here | Get Title |
uploadFile | - | Upload File |
0.0.1
3 years ago