@svatah/yam-adapter-appium
Appium adapter: Android Chrome and native
- Source:
packages/adapter-appium· README:packages/adapter-appium/README.md - Install:
npm install @svatah/yam-adapter-appium - Version 0.1.0 · Apache-2.0
Exports
| Export | Kind | Signature | |
|---|---|---|---|
APPIUM_ADAPTER_NAME | variable | APPIUM_ADAPTER_NAME = "appium" | The name this adapter is selected by in yam.config.yaml (LLD §2.4). |
APPIUM_CAPABILITIES | variable | APPIUM_CAPABILITIES: Capabilities | What this adapter can do (LLD §2.4). |
APPIUM_CAPS_ENV | variable | APPIUM_CAPS_ENV = "YAM_APPIUM_CAPS" | YAM_APPIUM_CAPS: a JSON object of capabilities, merged over the config's. |
APPIUM_URL_ENV | variable | APPIUM_URL_ENV = "YAM_APPIUM_URL" | YAM_APPIUM_URL: where the Appium server is listening. |
AppiumAdapterOptions | interface | export interface AppiumAdapterOptions | |
AppiumCheckContext | interface | export interface AppiumCheckContext | |
AppiumClient | interface | export interface AppiumClient | The W3C WebDriver commands this adapter uses. |
AppiumConnectOptions | interface | export interface AppiumConnectOptions | |
appiumServerUrl | function | export function appiumServerUrl( | Where the Appium server is, from the flag layer, the environment, or the default. |
AppiumSurface | class | export class AppiumSurface implements AgentSurface | |
appiumUnreachable | function | export function appiumUnreachable(url: string, cause: unknown): SessionErrorType | The message a person can act on when there is no Appium server. |
boxOf | function | export function boxOf(node: SourceNode): [number, number, number, number] | undefined | |
capabilitiesFromEnv | function | export function capabilitiesFromEnv(env: NodeJS.ProcessEnv = process.env): Record<string, unknown> | Capabilities the environment adds or overrides. |
classesForRole | function | export function classesForRole(role: string): string[] | The native classes that map onto an ARIA role. |
connectWebdriverIo | function | export async function connectWebdriverIo(options: AppiumConnectOptions): Promise<AppiumClient> | Connect through WebdriverIO (LLD §7.4). |
ConvertedNode | interface | export interface ConvertedNode extends SnapshotNode | |
ConvertOptions | interface | export interface ConvertOptions | |
convertPageSource | function | export function convertPageSource( | A page source, as the normalised node list of LLD §2.2. |
createAppiumSurface | function | export function createAppiumSurface( | Build a surface from a project config (LLD §2.4). |
DEFAULT_APPIUM_URL | variable | DEFAULT_APPIUM_URL = "http://127.0.0.1:4723" | |
ElementId | typealias | export type ElementId = string; | An element the driver found: the opaque id the protocol hands back. |
evaluateAppiumPredicate | function | export async function evaluateAppiumPredicate( | |
isNativeContext | function | export function isNativeContext(context: string): boolean | Which context a name refers to: Appium calls the native one NATIVE_APP. |
literalValue | function | export function literalValue(ref: ValueRef): string | The literal a ValueRef names; an unresolved one is a caller mistake (LLD §8.2). |
maskPng | function | export function maskPng( | Paint solid rectangles over a PNG. |
nameOf | function | export function nameOf(node: SourceNode): string | The accessible name: content-desc, then text, then iOS's label or name. |
nativeStrategy | function | export function nativeStrategy(candidate: Candidate): Strategy | The strategy for a candidate in a native context. |
parseBounds | function | export function parseBounds(bounds: string | undefined): [number, number, number, number] | undefined | [x, y, width, height] from Android's [left,top][right,bottom]. |
parsePageSource | function | export function parsePageSource(xml: string): SourceNode | Parse a page source into a tree. |
registerAppiumAdapter | function | export function registerAppiumAdapter(): void | Register the adapter. Idempotent, because the registry refuses a silent |
roleOf | function | export function roleOf(node: SourceNode): string | The role a native class means, in the ARIA vocabulary (REQ-SURF-4). |
SourceNode | interface | export interface SourceNode | One element as the page source describes it, before any normalisation. |
statesOf | function | export function statesOf(node: SourceNode): SnapshotNode["states"] | The states LLD §2.2 publishes, read from the platform's boolean attributes. |
Strategy | interface | export interface Strategy | One W3C using / value pair, as POST /session/:id/elements takes it. |
strategyFor | function | export function strategyFor( | The strategy for a candidate, given which context the session is in. |
unescapeXml | function | export function unescapeXml(value: string): string | The five XML entities, plus the numeric escapes a label can contain. |
UnsupportedPng | class | export class UnsupportedPng extends Error | What this masker can rewrite, and why anything else is refused. |
valueOf | function | export function valueOf(node: SourceNode): string | undefined | The value a control holds, as distinct from what it is called. |
WebdriverIoBrowser | interface | export interface WebdriverIoBrowser | The WebdriverIO surface this adapter uses, as a structural type. |
webdriverIoClient | function | export function webdriverIoClient(browser: WebdriverIoBrowser): AppiumClient | AppiumClient over a WebdriverIO browser object. |
webviewStrategy | function | export function webviewStrategy( | The strategy for a candidate in a webview context. |
xpathLiteral | function | export function xpathLiteral(value: string): string | Quote a value for an XPath predicate, including one that contains quotes. |
xpathOf | function | export function xpathOf(path: readonly SourceNode[]): string | The XPath that names one node from the root, by class and sibling index. |