/// import { FlagpoleExecution, iScenario, iSuite, ValuePromise } from ".."; import { FindAllOptions, FindOptions } from "./find-options"; import { JsFunction, OptionalXY } from "./generic-types"; import { GestureOpts, GestureType } from "./gesture"; import { iHttpRequest } from "./http"; import { iAssertion } from "./iassertion"; import { iAssertionResult } from "./iassertion-result"; import { iResponse } from "./iresponse"; import { IteratorBoolCallback, IteratorCallback } from "./iterator-callbacks"; import { iValue } from "./ivalue"; import { PointerMove } from "./pointer"; import { ScreenProperties } from "./screen-properties"; export interface iNextCallback { (context: T, ...args: any[]): Promise | void; } export interface iAssertionContext { result: any; request: iHttpRequest; response: ResponseType; scenario: ScenarioType; suite: iSuite; executionOptions: FlagpoleExecution; incompleteAssertions: iAssertion[]; assertionsResolved: Promise<(iAssertionResult | null)[]>; subScenariosResolved: Promise; currentUrl: iValue; comment(input: any): this; assert(a: any, b?: any): iAssertion; pause(milliseconds: number): Promise; push(aliasName: string, value: any): this; set(aliasName: string, value: any): this; get(aliasName: string): T; exists(selector: string | string[], opts?: FindOptions): ValuePromise; exists(selector: string | string[], contains: string, opts?: FindOptions): ValuePromise; exists(selector: string | string[], matches: RegExp, opts?: FindOptions): ValuePromise; existsAll(selector: string | string[], opts?: FindOptions): Promise; existsAll(selector: string | string[], contains: string, opts?: FindOptions): Promise; existsAll(selector: string | string[], matches: RegExp, opts?: FindOptions): Promise; existsAny(selectors: string[], opts?: FindOptions): Promise; existsAny(selector: string[], contains: string, opts?: FindOptions): Promise; existsAny(selector: string[], matches: RegExp, opts?: FindOptions): Promise; find(selector: string | string[], opts?: FindOptions): ValuePromise; find(selector: string | string[], contains: string, opts?: FindOptions): ValuePromise; find(selector: string | string[], matches: RegExp, opts?: FindOptions): ValuePromise; findAll(selector: string | string[], opts?: FindAllOptions): Promise; findAll(selector: string | string[], contains: string, opts?: FindAllOptions): Promise; findAll(selector: string | string[], matches: RegExp, opts?: FindAllOptions): Promise; findXPath(xPath: string): ValuePromise; findAllXPath(xPath: string): Promise; click(selector: string, opts?: FindOptions): ValuePromise; click(selector: string, contains: string, opts?: FindOptions): ValuePromise; click(selector: string, matches: RegExp, opts?: FindOptions): ValuePromise; submit(selector: string): ValuePromise; type(selector: string, textToType: string, opts?: any): ValuePromise; clear(selector: string): ValuePromise; clearThenType(selector: string, textToType: string, opts?: any): ValuePromise; selectOption(selector: string, value: string | string[]): Promise; eval(js: JsFunction, ...args: any[]): Promise; waitForFunction(js: JsFunction, opts?: { polling?: string | number; timeout?: number; }, ...args: any[]): Promise; waitForReady(timeout?: number): Promise; waitForLoad(timeout?: number): Promise; waitForNetworkIdle(timeout?: number): Promise; waitForNavigation(timeout?: number, waitFor?: string | string[]): Promise; waitForHidden(selector: string, timeout?: number): ValuePromise; waitForVisible(selector: string, timeout?: number): ValuePromise; waitForExists(selector: string, timeout?: number): ValuePromise; waitForExists(selector: string, contains: string | RegExp, timeout?: number): ValuePromise; waitForNotExists(selector: string, timeout?: number): ValuePromise; waitForNotExists(selector: string, contains: string | RegExp, timeout?: number): ValuePromise; waitForXPath(xPath: string, timeout?: number): ValuePromise; waitForHavingText(selector: string, text: string | RegExp, timeout?: number): ValuePromise; openInBrowser(): Promise; screenshot(): Promise; screenshot(localFilePath: string): Promise; screenshot(localFilePath: string, opts: {}): Promise; screenshot(opts: {}): Promise; logFailure(message: string, errorDetails?: any, sourceCode?: any, highlightText?: any): iAssertionResult; logOptionalFailure(message: string, errorDetails?: any): iAssertionResult; logPassing(message: string): iAssertionResult; scrollTo(point: OptionalXY): Promise; count(array: T[]): ValuePromise; count(array: T[], callback: IteratorBoolCallback): ValuePromise; some(array: T[], callback: IteratorBoolCallback): Promise; none(array: T[], callback: IteratorBoolCallback): Promise; every(array: T[], callback: IteratorBoolCallback): Promise; each(array: T[], callback: IteratorCallback): Promise; filter(array: T[], callback: IteratorBoolCallback): Promise; map(array: T[], callback: IteratorCallback): Promise; abort(message?: string): Promise; rotateScreen(rotation: string | number): Promise; getScreenProperties(): Promise; hideKeyboard(): Promise; movePointer(...pointers: PointerMove[]): Promise; gesture(type: GestureType, opts: GestureOpts): Promise; getSource(): ValuePromise; }