@applitools/spec-driver-webdriverio
Version:
66 lines (65 loc) • 4.44 kB
TypeScript
declare const _default: import('@applitools/driver').SpecDriver<SpecType>;
export default _default;
export function isDriver(browser: any): browser is Driver;
export function isElement(element: any): element is Element;
export function isSelector(selector: any): selector is Selector;
export function transformDriver(driver: Driver): Driver;
export function transformElement(element: Element): Element;
export function transformSelector(selector: import('@applitools/driver').CommonSelector<Selector>): Selector;
export function untransformSelector(selector: Selector): null | import('@applitools/driver').CommonSelector;
export function extractSelector(element: Element): Selector;
export function isStaleElementError(error: any): boolean;
export function isEqualElements(_browser: Driver, element1: Element, element2: Element): Promise<boolean>;
export function extractHostName(driver: Driver): null | string;
export function executeScript(browser: Driver, script: string | ((arg: any) => any), arg?: any): Promise<any>;
export function mainContext(browser: Driver): Promise<Driver>;
export function parentContext(browser: Driver): Promise<Driver>;
export function childContext(browser: Driver, element: Element): Promise<Driver>;
export function findElement(browser: Driver, selector: Selector, parent?: undefined | Element): Promise<null | Applitools.WebdriverIO.Element>;
export function findElements(browser: Driver, selector: Selector, parent?: undefined | Element): Promise<Array<Applitools.WebdriverIO.Element>>;
export function getWindowSize(browser: Driver): Promise<{ width: number; height: number; }>;
export function setWindowSize(browser: Driver, size: { width: number; height: number; }): Promise<void>;
export function getCookies(browser: Driver, context?: undefined | boolean): Promise<Array<import('@applitools/driver').Cookie>>;
export function getDriverInfo(driver: Driver): Promise<import('@applitools/driver').DriverInfo>;
export function getCapabilities(browser: Driver): Promise<Record<string, any>>;
export function getTitle(browser: Driver): Promise<string>;
export function getUrl(browser: Driver): Promise<string>;
export function visit(browser: Driver, url: string): Promise<void>;
export function takeScreenshot(browser: Driver): Promise<string | Buffer>;
export function click(browser: Driver, element: Element | Selector): Promise<void>;
export function hover(browser: Driver, element: Element | Selector): Promise<any>;
export function waitUntilDisplayed(browser: Driver, selector: Selector, timeout: number): Promise<void>;
export function getSystemBars(browser: Driver): Promise<{ statusBar: {
visible: boolean;
x: number;
y: number;
height: number;
width: number;
}; navigationBar: {
visible: boolean;
x: number;
y: number;
height: number;
width: number;
}; }>;
export function getOrientation(browser: Driver): Promise<import('@applitools/driver').ScreenOrientation>;
export function setOrientation(browser: Driver, orientation: import('@applitools/driver').ScreenOrientation): Promise<void>;
export function getElementRegion(browser: Driver, element: Element): Promise<{
x: number;
y: number;
width: number;
height: number;
}>;
export function getElementAttribute(browser: Driver, element: Element, attr: string): Promise<string>;
export function getElementText(browser: Driver, element: Element): Promise<string>;
export function setElementText(browser: Driver, element: Element | Selector, text: string): Promise<void>;
export function performAction(browser: Driver, steps: Array<any>): Promise<void>;
export function getCurrentWorld(driver: Driver): Promise<string>;
export function getWorlds(driver: Driver): Promise<Array<string>>;
export function switchWorld(driver: Driver, name: string): Promise<void>;
export function build(env: any): Promise<[Driver, () => Promise<void>]>;
export type Driver = Applitools.WebdriverIO.Browser & { __applitoolsBrand?: undefined; };
export type Element = (Applitools.WebdriverIO.Element | { ELEMENT: string; } | { 'element-6066-11e4-a52e-4f735466cecf': string; }) & { __applitoolsBrand?: undefined; };
export type ShadowRoot = { 'shadow-6066-11e4-a52e-4f735466cecf': string; };
export type Selector = (Applitools.WebdriverIO.Selector | { using: string; value: string; }) & { __applitoolsBrand?: undefined; };
export type SpecType = { driver: Driver; context: Driver; element: Element; selector: Selector; };