cybernaut
Version:
Reliable, automated web UI testing in BDD-style.
22 lines (21 loc) • 1.44 kB
TypeScript
import { SeleniumAccessor } from './accessor';
import { SeleniumAction } from './action';
import { SeleniumElement } from './element';
export declare function defineElement(name: string, selector: string, index?: number): SeleniumElement;
export declare function elementCount(selector: string): SeleniumAccessor<number>;
export declare type ActionScript = (callback: () => void) => void;
export declare function executeScript(scriptName: string, script: ActionScript): SeleniumAction;
export declare function loadPage(url: string): SeleniumAction;
export declare function navigateBack(): SeleniumAction;
export declare function navigateForward(): SeleniumAction;
export declare const pageTitle: SeleniumAccessor<string>;
export declare const pageUrl: SeleniumAccessor<string>;
export declare function reloadPage(): SeleniumAction;
export declare type AccessorScript<T> = (callback: (result: T) => void) => void;
export declare function scriptResult<T>(scriptName: string, script: AccessorScript<T>): SeleniumAccessor<T>;
export declare function setWindowPosition(x: number, y: number): SeleniumAction;
export declare function setWindowSize(width: number, height: number): SeleniumAction;
export declare const windowHeight: SeleniumAccessor<number>;
export declare const windowWidth: SeleniumAccessor<number>;
export declare const windowXPosition: SeleniumAccessor<number>;
export declare const windowYPosition: SeleniumAccessor<number>;