Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
chore(types): types for extended webdriver functions (#4000)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjelin authored Jan 26, 2017
1 parent 23478f5 commit ccf02ab
Showing 1 changed file with 48 additions and 2 deletions.
50 changes: 48 additions & 2 deletions lib/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,54 @@ export class AbstractWebDriver {
}

export class AbstractExtendedWebDriver extends AbstractWebDriver {
getNetworkConnection: () => wdpromise.Promise<number>;
setNetworkConnection: (type: number) => wdpromise.Promise<void>;
getNetworkConnection: () => wdpromise.Promise<0|1|2|3|4|5|6|7>;
setNetworkConnection:
(typeOrAirplaneMode: 0|1|2|3|4|5|6|7|boolean, wifi?: boolean,
data?: boolean) => wdpromise.Promise<void>;
toggleAirplaneMode: () => wdpromise.Promise<void>;
toggleWiFi: () => wdpromise.Promise<void>;
toggleData: () => wdpromise.Promise<void>;
toggleLocationServices: () => wdpromise.Promise<void>;
getGeolocation: () => wdpromise.Promise<{latitude: number, longitude: number, altitude: number}>;
setGeolocation:
(latitude?: number, longitude?: number, altitude?: number) => wdpromise.Promise<void>;
getCurrentDeviceActivity: () => wdpromise.Promise<string>;
startDeviceActivity:
(appPackage: string, appActivity: string, appWaitPackage?: string,
appWaitActivity?: string) => wdpromise.Promise<void>;
getAppiumSettings: () => wdpromise.Promise<{[name: string]: any}>;
setAppiumSettings: (settings: {[name: string]: any}) => wdpromise.Promise<void>;
getCurrentContext: () => wdpromise.Promise<string>;
selectContext: (name: string) => wdpromise.Promise<void>;
listContexts: () => wdpromise.Promise<string[]>;
getScreenOrientation: () => wdpromise.Promise<'LANDSCAPE'|'PORTRAIT'>;
setScreenOrientation: (orientation: string) => wdpromise.Promise<void>;
isDeviceLocked: () => wdpromise.Promise<boolean>;
lockDevice: (delay?: number) => wdpromise.Promise<void>;
unlockDevice: () => wdpromise.Promise<void>;
installApp: (appPath: string) => wdpromise.Promise<void>;
isAppInstalled: (bundleId: string) => wdpromise.Promise<boolean>;
removeApp: (appId: string) => wdpromise.Promise<void>;
pullFileFromDevice: (path: string) => wdpromise.Promise<string>;
pullFolderFromDevice: (path: string) => wdpromise.Promise<any>;
pushFileToDevice: (path: string, base64Data: string) => wdpromise.Promise<void>;
uploadFile: (base64Data: string) => wdpromise.Promise<void>;
switchToParentFrame: () => wdpromise.Promise<void>;
fullscreen: () => wdpromise.Promise<void>;
sendAppToBackground: (delay?: number) => wdpromise.Promise<void>;
closeApp: () => wdpromise.Promise<void>;
getAppStrings: (language?: string) => wdpromise.Promise<string[]>;
launchSession: () => wdpromise.Promise<void>;
resetApp: () => wdpromise.Promise<void>;
hideSoftKeyboard:
(strategy?: 'default'|'tapOutside'|'tapOut'|'swipeDown'|'pressKey'|'press',
key?: string) => wdpromise.Promise<void>;
getDeviceTime: () => wdpromise.Promise<string>;
openDeviceNotifications: () => wdpromise.Promise<void>;
rotationGesture:
(x?: number, y?: number, duration?: number, rotation?: number,
touchCount?: 1|2|3|4|5) => wdpromise.Promise<void>;
shakeDevice: () => wdpromise.Promise<void>;
}

/**
Expand Down

0 comments on commit ccf02ab

Please sign in to comment.