UNPKG

cybernaut

Version:

Reliable, zero configuration end-to-end testing in BDD-style.

25 lines (24 loc) 980 B
import { Accessor } from './accessor'; import { Action } from './action'; export declare type Script = (callback: (result?: any) => void) => void; export declare class Browser { private readonly _screenshotDirectory; constructor(screenshotDirectory: string); readonly pageTitle: Accessor<string>; readonly pageUrl: Accessor<string>; readonly windowX: Accessor<number>; readonly windowY: Accessor<number>; readonly windowWidth: Accessor<number>; readonly windowHeight: Accessor<number>; scriptResult(scriptName: string, script: Script): Accessor<any>; executeScript(scriptName: string, script: Script): Action; loadPage(url: string): Action; maximizeWindow(): Action; navigateBack(): Action; navigateForward(): Action; reloadPage(): Action; setWindowPosition(x: number, y: number): Action; setWindowSize(width: number, height: number): Action; sleep(duration: number): Action; takeScreenshot(): Action; }