;
then(onFulfilled?: (value: T) => P | Client
, onRejected?: (err: any) => P | Client
): Client
;
catch
(onRejected?: (err: any) => P | Client
): Client
;
inspect(): Q.PromiseState;
}
// Action
export interface Client {
addValue(selector: string, value: string | number): Client;
addValue(
selector: string,
value: string | number,
callback: (err: any) => P
): Client
;
clearElement(selector: string): Client;
clearElement(
selector: string,
callback: (err: any) => P
): Client
;
click(selector: string): Client;
click(
selector: string,
callback: (err: any) => P
): Client
;
doubleClick(selector: string): Client;
doubleClick(
selector: string,
callback: (err: any) => P
): Client
;
dragAndDrop(sourceElem: string, destinationElem: string): Client;
dragAndDrop(
sourceElem: string,
destinationElem: string, callback: (err: any) => P
): Client
;
leftClick(selector: string): Client;
leftClick(
selector: string,
callback: (err: any) => P
): Client
;
middleClick(selector: string): Client;
middleClick(
selector: string,
callback: (err: any) => P
): Client
;
moveToObject(selector: string): Client;
moveToObject(selector: string, xoffset: number, yoffset: number): Client;
moveToObject(
selector: string,
callback: (err: any) => P
): Client
;
moveToObject
(
selector: string,
xoffset: number,
yoffset: number,
callback: (err: any) => P
): Client
;
rightClick(selector: string): Client;
rightClick(
selector: string,
callback: (err: any) => P
): Client
;
selectByAttribute(selector: string, attribute: string, value: string): Client;
selectByAttribute(
selector: string,
attribute: string,
value: string,
callback: (err: any) => P
): Client
;
selectByIndex(selectElem: string, index: number): Client;
selectByIndex(
selectElem: string,
index: number,
callback: (err: any) => P
): Client
;
selectByValue(selectElem: string, value: string): Client;
selectByValue(
selectElem: string,
value: string,
callback: (err: any) => P
): Client
;
selectByVisibleText(selectElem: string, text: string): Client;
selectByVisibleText(
selectElem: string,
text: string,
callback: (err: any) => P
): Client
;
selectorExecute
(
selectors: string | string[],
script: (elements: HTMLElement | HTMLElement[], ...args: any[]) => P,
...args: any[]
): Client
;
selectorExecuteAsync
(
selectors: string | string[],
script: (elements: HTMLElement | HTMLElement[], ...args: any[]) => P,
...args: any[]
): Client
;
setValue(selector: string, values: number | string | Array): Client;
setValue(
selector: string,
values: number | string | Array,
callback: (err: any) => P
): Client;
submitForm(selector: string): Client;
submitForm(
selector: string,
callback: (err: any) => P
): Client;
}
// Appium
export interface Client {
// backgroundApp
// closeApp
// context
// contexts
// deviceKeyEvent
// getAppStrings
// getCurrentDeviceActivity
// getNetworkConnection
// hideDeviceKeyboard
// installAppOnDevice
// isAppInstalledOnDevice
// launchApp
// lock
// openNotifications
// performMultiAction
// performTouchAction
// pullFileFromDevice
// pushFileToDevice
// removeAppFromDevice
// resetApp
// rotate
// setImmediateValueInApp
// setNetworkConnection
// shake
// toggleAirplaneModeOnDevice
// toggleDataOnDevice
// toggleLocationServicesOnDevice
// toggleWiFiOnDevice
}
export interface Cookie {
name: string;
value: string;
}
// Cookie
export interface Client {
deleteCookie(name?: string): Client;
deleteCookie(
callback: (err: any) => P
): Client
;
deleteCookie
(
name: string,
callback: (err: any) => P
): Client
;
getCookie(): Client;
getCookie(name: string): Client;
getCookie(
callback: (err: any, cookies: Cookie[]) => P
): Client
;
getCookie
(
name: string,
callback: (err: any, cookie: Cookie) => P
): Client
;
setCookie(cookie: Cookie): Client;
setCookie(
cookie: Cookie,
callback: (err: any) => P
): Client
;
}
export interface Client {
session(action?: string, sessionId?: string): Client>;
session(
callback: (err: any, result: RawResult) => P
): Client;
getGridNodeDetails(): Client