@@ -66,8 +66,54 @@ export class AbstractWebDriver {
66
66
}
67
67
68
68
export class AbstractExtendedWebDriver extends AbstractWebDriver {
69
- getNetworkConnection : ( ) => wdpromise . Promise < number > ;
70
- setNetworkConnection : ( type : number ) => wdpromise . Promise < void > ;
69
+ getNetworkConnection : ( ) => wdpromise . Promise < 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 > ;
70
+ setNetworkConnection :
71
+ ( typeOrAirplaneMode : 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | boolean , wifi ?: boolean ,
72
+ data ?: boolean ) => wdpromise . Promise < void > ;
73
+ toggleAirplaneMode : ( ) => wdpromise . Promise < void > ;
74
+ toggleWiFi : ( ) => wdpromise . Promise < void > ;
75
+ toggleData : ( ) => wdpromise . Promise < void > ;
76
+ toggleLocationServices : ( ) => wdpromise . Promise < void > ;
77
+ getGeolocation : ( ) => wdpromise . Promise < { latitude : number , longitude : number , altitude : number } > ;
78
+ setGeolocation :
79
+ ( latitude ?: number , longitude ?: number , altitude ?: number ) => wdpromise . Promise < void > ;
80
+ getCurrentDeviceActivity : ( ) => wdpromise . Promise < string > ;
81
+ startDeviceActivity :
82
+ ( appPackage : string , appActivity : string , appWaitPackage ?: string ,
83
+ appWaitActivity ?: string ) => wdpromise . Promise < void > ;
84
+ getAppiumSettings : ( ) => wdpromise . Promise < { [ name : string ] : any } > ;
85
+ setAppiumSettings : ( settings : { [ name : string ] : any } ) => wdpromise . Promise < void > ;
86
+ getCurrentContext : ( ) => wdpromise . Promise < string > ;
87
+ selectContext : ( name : string ) => wdpromise . Promise < void > ;
88
+ listContexts : ( ) => wdpromise . Promise < string [ ] > ;
89
+ getScreenOrientation : ( ) => wdpromise . Promise < 'LANDSCAPE' | 'PORTRAIT' > ;
90
+ setScreenOrientation : ( orientation : string ) => wdpromise . Promise < void > ;
91
+ isDeviceLocked : ( ) => wdpromise . Promise < boolean > ;
92
+ lockDevice : ( delay ?: number ) => wdpromise . Promise < void > ;
93
+ unlockDevice : ( ) => wdpromise . Promise < void > ;
94
+ installApp : ( appPath : string ) => wdpromise . Promise < void > ;
95
+ isAppInstalled : ( bundleId : string ) => wdpromise . Promise < boolean > ;
96
+ removeApp : ( appId : string ) => wdpromise . Promise < void > ;
97
+ pullFileFromDevice : ( path : string ) => wdpromise . Promise < string > ;
98
+ pullFolderFromDevice : ( path : string ) => wdpromise . Promise < any > ;
99
+ pushFileToDevice : ( path : string , base64Data : string ) => wdpromise . Promise < void > ;
100
+ uploadFile : ( base64Data : string ) => wdpromise . Promise < void > ;
101
+ switchToParentFrame : ( ) => wdpromise . Promise < void > ;
102
+ fullscreen : ( ) => wdpromise . Promise < void > ;
103
+ sendAppToBackground : ( delay ?: number ) => wdpromise . Promise < void > ;
104
+ closeApp : ( ) => wdpromise . Promise < void > ;
105
+ getAppStrings : ( language ?: string ) => wdpromise . Promise < string [ ] > ;
106
+ launchSession : ( ) => wdpromise . Promise < void > ;
107
+ resetApp : ( ) => wdpromise . Promise < void > ;
108
+ hideSoftKeyboard :
109
+ ( strategy ?: 'default' | 'tapOutside' | 'tapOut' | 'swipeDown' | 'pressKey' | 'press' ,
110
+ key ?: string ) => wdpromise . Promise < void > ;
111
+ getDeviceTime : ( ) => wdpromise . Promise < string > ;
112
+ openDeviceNotifications : ( ) => wdpromise . Promise < void > ;
113
+ rotationGesture :
114
+ ( x ?: number , y ?: number , duration ?: number , rotation ?: number ,
115
+ touchCount ?: 1 | 2 | 3 | 4 | 5 ) => wdpromise . Promise < void > ;
116
+ shakeDevice : ( ) => wdpromise . Promise < void > ;
71
117
}
72
118
73
119
/**
0 commit comments