cabbie-async
Version:
An asynchronous webdriver client
48 lines (47 loc) • 2.12 kB
TypeScript
/// <reference types="node" />
/**
*
* This file is generated automatically, run npm run build to re-generate.
**/
import { SelectorType } from './enums/selector-types';
import Driver from './driver';
import { Options } from './flow-types/options';
import Alert from './alert';
import Element from './element';
import Frame from './frame';
import GlobalMouse from './global-mouse';
import GlobalTouch from './global-touch';
import Navigator from './navigator';
import BaseWindow from './base-window';
import WindowHandle from './window-handle';
declare class ActiveWindow extends BaseWindow {
touch: GlobalTouch;
mouse: GlobalMouse;
navigator: Navigator;
frame: Frame;
alert: Alert;
_options: Options;
constructor(driver: Driver, options: Options);
getWindowHandle(): Promise<WindowHandle>;
execute(script: string | Function, args?: Array<any>): Promise<any>;
asyncExecute(script: string | Function, args?: Array<any>): Promise<void>;
sendKeys(str: string | Array<string>): Promise<void>;
takeScreenshot(): Promise<Buffer>;
getActiveElement(): Promise<Element>;
getElement(selector: string, selectorType?: SelectorType): Promise<Element>;
tryGetElement(selector: string, selectorType?: SelectorType): Promise<Element | null>;
getElements(selector: string, selectorType?: SelectorType): Promise<Array<Element>>;
getElementsByTextContent(textContent: string, selector?: string, selectorType?: SelectorType): Promise<Array<Element>>;
getElementByTextContent(textContent: string, selector?: string, selectorType?: SelectorType): Promise<Element>;
tryGetElementByTextContent(textContent: string, selector?: string, selectorType?: SelectorType): Promise<Element | null>;
hasElement(selector: string, selectorType?: SelectorType): Promise<boolean>;
close(): Promise<void>;
getTitle(): Promise<string>;
getSource(): Promise<string>;
goForward(): Promise<void>;
goBackward(): Promise<void>;
refresh(): Promise<void>;
getUrl(): Promise<string>;
navigateTo(path: string): Promise<void>;
}
export default ActiveWindow;