@appium/fake-driver 5.1.3 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/commands/alert.d.ts +58 -310
- package/build/lib/commands/alert.d.ts.map +1 -1
- package/build/lib/commands/alert.js +58 -69
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/contexts.d.ts +81 -330
- package/build/lib/commands/contexts.d.ts.map +1 -1
- package/build/lib/commands/contexts.js +75 -84
- package/build/lib/commands/contexts.js.map +1 -1
- package/build/lib/commands/element.d.ts +146 -315
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +134 -98
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/find.d.ts +83 -327
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +93 -97
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.d.ts +174 -332
- package/build/lib/commands/general.d.ts.map +1 -1
- package/build/lib/commands/general.js +119 -90
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/index.d.ts +5 -1523
- package/build/lib/commands/index.d.ts.map +1 -1
- package/build/lib/commands/index.js +14 -14
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/driver.d.ts +80 -15
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +74 -24
- package/build/lib/driver.js.map +1 -1
- package/build/lib/types.d.ts +1 -24
- package/build/lib/types.d.ts.map +1 -1
- package/lib/commands/alert.js +58 -67
- package/lib/commands/contexts.js +72 -81
- package/lib/commands/element.js +135 -94
- package/lib/commands/find.js +94 -98
- package/lib/commands/general.js +119 -91
- package/lib/commands/index.js +5 -13
- package/lib/driver.js +76 -20
- package/lib/types.ts +1 -29
- package/package.json +4 -3
- package/build/tsconfig.tsbuildinfo +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":""}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
return (0, general_1.GeneralMixin)((0, find_1.FindMixin)((0, element_1.ElementMixin)((0, alert_1.AlertMixin)((0, contexts_1.ContextsMixin)(Base)))));
|
|
15
|
-
}
|
|
16
|
-
exports.FakeDriverMixin = FakeDriverMixin;
|
|
6
|
+
exports.general = exports.find = exports.element = exports.contexts = exports.alert = void 0;
|
|
7
|
+
var alert_1 = require("./alert");
|
|
8
|
+
Object.defineProperty(exports, "alert", { enumerable: true, get: function () { return __importDefault(alert_1).default; } });
|
|
9
|
+
var contexts_1 = require("./contexts");
|
|
10
|
+
Object.defineProperty(exports, "contexts", { enumerable: true, get: function () { return __importDefault(contexts_1).default; } });
|
|
11
|
+
var element_1 = require("./element");
|
|
12
|
+
Object.defineProperty(exports, "element", { enumerable: true, get: function () { return __importDefault(element_1).default; } });
|
|
13
|
+
var find_1 = require("./find");
|
|
14
|
+
Object.defineProperty(exports, "find", { enumerable: true, get: function () { return __importDefault(find_1).default; } });
|
|
15
|
+
var general_1 = require("./general");
|
|
16
|
+
Object.defineProperty(exports, "general", { enumerable: true, get: function () { return __importDefault(general_1).default; } });
|
|
17
17
|
/* // TODO:
|
|
18
18
|
//rest.post('/wd/hub/session/:sessionId?/touch/click', controller.doClick);
|
|
19
19
|
//rest.post('/wd/hub/session/:sessionId?/touch/longclick', controller.touchLongClick);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":";;;;;;AAAA,iCAAyC;AAAjC,+GAAA,OAAO,OAAS;AACxB,uCAA+C;AAAvC,qHAAA,OAAO,OAAY;AAC3B,qCAA6C;AAArC,mHAAA,OAAO,OAAW;AAC1B,+BAAuC;AAA/B,6GAAA,OAAO,OAAQ;AACvB,qCAA6C;AAArC,mHAAA,OAAO,OAAW;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsFE"}
|
package/build/lib/driver.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @extends {BaseDriver<FakeDriverConstraints>}
|
|
6
6
|
* @implements {ExternalDriver<FakeDriverConstraints>}
|
|
7
7
|
*/
|
|
8
|
-
export class
|
|
8
|
+
export class FakeDriver extends BaseDriver<{
|
|
9
9
|
readonly app: {
|
|
10
10
|
readonly presence: true;
|
|
11
11
|
readonly isString: true;
|
|
@@ -146,20 +146,85 @@ export class FakeDriverCore extends BaseDriver<{
|
|
|
146
146
|
* @returns {Promise<void>}
|
|
147
147
|
*/
|
|
148
148
|
callDeprecatedCommand(): Promise<void>;
|
|
149
|
-
|
|
150
|
-
*
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
149
|
+
/*********
|
|
150
|
+
* ALERT *
|
|
151
|
+
*********/
|
|
152
|
+
assertNoAlert: (this: FakeDriver) => void;
|
|
153
|
+
assertAlert: (this: FakeDriver) => void;
|
|
154
|
+
getAlertText: (this: FakeDriver) => Promise<string>;
|
|
155
|
+
setAlertText: (this: FakeDriver, text: string) => Promise<void>;
|
|
156
|
+
postAcceptAlert: (this: FakeDriver) => Promise<void>;
|
|
157
|
+
postDismissAlert: (this: FakeDriver) => Promise<void>;
|
|
158
|
+
/************
|
|
159
|
+
* CONTEXTS *
|
|
160
|
+
************/
|
|
161
|
+
getRawContexts: (this: FakeDriver) => {
|
|
162
|
+
NATIVE_APP: null;
|
|
163
|
+
PROXY: null;
|
|
164
|
+
};
|
|
165
|
+
assertWebviewContext: (this: FakeDriver) => void;
|
|
166
|
+
getCurrentContext: (this: FakeDriver) => Promise<string>;
|
|
167
|
+
getContexts: (this: FakeDriver) => Promise<string[]>;
|
|
168
|
+
setContext: (this: FakeDriver, context: string) => Promise<void>;
|
|
169
|
+
setFrame: (this: FakeDriver, frameId: number) => Promise<void>;
|
|
170
|
+
/************
|
|
171
|
+
* ELEMENTS *
|
|
172
|
+
************/
|
|
173
|
+
getElements: (this: FakeDriver, elIds: any) => any;
|
|
174
|
+
getElement: (this: FakeDriver, elId: any) => any;
|
|
175
|
+
getName: (this: FakeDriver, elementId: any) => Promise<any>;
|
|
176
|
+
elementDisplayed: (this: FakeDriver, elementId: any) => Promise<any>;
|
|
177
|
+
elementEnabled: (this: FakeDriver, elementId: any) => Promise<any>;
|
|
178
|
+
elementSelected: (this: FakeDriver, elementId: any) => Promise<any>;
|
|
179
|
+
setValue: (this: FakeDriver, keys: any, elementId: any) => Promise<void>;
|
|
180
|
+
getText: (this: FakeDriver, elementId: any) => Promise<any>;
|
|
181
|
+
clear: (this: FakeDriver, elementId: any) => Promise<void>;
|
|
182
|
+
click: (this: FakeDriver, elementId: string) => Promise<void>;
|
|
183
|
+
getAttribute: (this: FakeDriver, attr: any, elementId: any) => Promise<any>;
|
|
184
|
+
getElementRect: (this: FakeDriver, elementId: any) => any;
|
|
185
|
+
getSize: (this: FakeDriver, elementId: any) => any;
|
|
186
|
+
equalsElement: (this: FakeDriver, el1Id: any, el2Id: any) => any;
|
|
187
|
+
getCssProperty: (this: FakeDriver, prop: any, elementId: any) => Promise<any>;
|
|
188
|
+
getLocation: (this: FakeDriver, elementId: string) => Promise<any>;
|
|
189
|
+
getLocationInView: (this: FakeDriver, elementId: any) => Promise<any>;
|
|
190
|
+
/********
|
|
191
|
+
* FIND *
|
|
192
|
+
********/
|
|
193
|
+
getExistingElementForNode: (this: FakeDriver, node: any) => string | null;
|
|
194
|
+
wrapNewEl: (this: FakeDriver, obj: any) => {
|
|
195
|
+
ELEMENT: string;
|
|
196
|
+
};
|
|
197
|
+
findElOrEls: <Mult extends boolean, Ctx = any>(this: FakeDriver, strategy: string, selector: string, mult: Mult, context?: Ctx | undefined) => Promise<Mult extends true ? import("@appium/types").Element[] : import("@appium/types").Element>;
|
|
198
|
+
findElements: (this: FakeDriver, strategy: any, selector: any) => Promise<import("@appium/types").Element[]>;
|
|
199
|
+
findElementFromElement: (this: FakeDriver, strategy: any, selector: any, elementId: any) => Promise<import("@appium/types").Element>;
|
|
200
|
+
findElementsFromElement: (this: FakeDriver, strategy: any, selector: any, elementId: any) => Promise<import("@appium/types").Element[]>;
|
|
201
|
+
/***********
|
|
202
|
+
* GENERAL *
|
|
203
|
+
***********/
|
|
204
|
+
title: (this: FakeDriver) => Promise<any>;
|
|
205
|
+
keys: (this: FakeDriver, value: any) => Promise<void>;
|
|
206
|
+
setGeoLocation: (this: FakeDriver, location: any) => Promise<void>;
|
|
207
|
+
getGeoLocation: (this: FakeDriver) => Promise<import("@appium/types").Location>;
|
|
208
|
+
getOrientation: (this: FakeDriver) => Promise<string>;
|
|
209
|
+
setOrientation: (this: FakeDriver, o: any) => Promise<void>;
|
|
210
|
+
getScreenshot: (this: FakeDriver) => Promise<string>;
|
|
211
|
+
getWindowSize: (this: FakeDriver) => Promise<{
|
|
212
|
+
width: number;
|
|
213
|
+
height: number;
|
|
214
|
+
}>;
|
|
215
|
+
getWindowRect: (this: FakeDriver) => Promise<{
|
|
216
|
+
width: number;
|
|
217
|
+
height: number;
|
|
218
|
+
x: number;
|
|
219
|
+
y: number;
|
|
220
|
+
}>;
|
|
221
|
+
performActions: (this: FakeDriver, actions: any) => Promise<void>;
|
|
222
|
+
getLog: (this: FakeDriver, type: any) => Promise<any[]>;
|
|
223
|
+
mobileShake: (this: FakeDriver) => Promise<void>;
|
|
224
|
+
doubleClick: (this: FakeDriver) => Promise<void>;
|
|
225
|
+
execute: (this: FakeDriver, script: any, args: any) => Promise<any>;
|
|
226
|
+
fakeAddition: (this: FakeDriver, num1: number, num2: number, num3?: number | undefined) => Promise<number>;
|
|
227
|
+
releaseActions: (this: FakeDriver) => Promise<void>;
|
|
163
228
|
}
|
|
164
229
|
export default FakeDriver;
|
|
165
230
|
export type FakeDriverConstraints = typeof FAKE_DRIVER_CONSTRAINTS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":"AAgBA;;GAEG;AAEH;;;GAGG;AACH;;;;;;;;6BAF+B,qBAAqB;IAkIlD;;;;;YAGI;;eAEG;;;;;;;;;;;;;;;;;;;;;;;;MAaJ;IAEH;;;;;;;;QAKE;;WAEG;;;;;;;;;;;;;MAWF;
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":"AAgBA;;GAEG;AAEH;;;GAGG;AACH;;;;;;;;6BAF+B,qBAAqB;IAkIlD;;;;;YAGI;;eAEG;;;;;;;;;;;;;;;;;;;;;;;;MAaJ;IAEH;;;;;;;;QAKE;;WAEG;;;;;;;;;;;;;MAWF;IAEH,2CAEC;IAED,mFAMC;IA1KD,qDASC;IAhBD;;;;;;;;MAAgD;IAEhD,qBAAqB;IACrB,YADW,MAAM,CACN;IAEX,kBAAyB;IAKvB,UAAe;IACf,iBAAuB;IACvB,gBAAgB;IAChB,eAAqB;IACrB,sBAAyB;IACzB,eAAkB;IAGpB,uBAEC;IAED,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B,OAAO,SAAS,EAAE,cAAc;gCAChC,OAAO,SAAS,EAAE,iBAAiB;4KAKnC,OAAO,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC;qGAKtC,OAAO,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC"}
|
package/build/lib/driver.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FakeDriver =
|
|
6
|
+
exports.FakeDriver = void 0;
|
|
7
7
|
const bluebird_1 = __importDefault(require("bluebird"));
|
|
8
8
|
const driver_1 = require("appium/driver");
|
|
9
9
|
const protocol_1 = require("@appium/base-driver/build/lib/protocol/protocol");
|
|
@@ -25,11 +25,79 @@ const FAKE_DRIVER_CONSTRAINTS = /** @type {const} */ ({
|
|
|
25
25
|
* @extends {BaseDriver<FakeDriverConstraints>}
|
|
26
26
|
* @implements {ExternalDriver<FakeDriverConstraints>}
|
|
27
27
|
*/
|
|
28
|
-
class
|
|
28
|
+
class FakeDriver extends driver_1.BaseDriver {
|
|
29
29
|
constructor(opts = {}, shouldValidateCaps = true) {
|
|
30
30
|
super(opts, shouldValidateCaps);
|
|
31
31
|
this.desiredCapConstraints = FAKE_DRIVER_CONSTRAINTS;
|
|
32
32
|
this.appModel = new fake_app_1.FakeApp();
|
|
33
|
+
/*********
|
|
34
|
+
* ALERT *
|
|
35
|
+
*********/
|
|
36
|
+
this.assertNoAlert = commands_1.alert.assertNoAlert;
|
|
37
|
+
this.assertAlert = commands_1.alert.assertAlert;
|
|
38
|
+
this.getAlertText = commands_1.alert.getAlertText;
|
|
39
|
+
this.setAlertText = commands_1.alert.setAlertText;
|
|
40
|
+
this.postAcceptAlert = commands_1.alert.postAcceptAlert;
|
|
41
|
+
this.postDismissAlert = commands_1.alert.postDismissAlert;
|
|
42
|
+
/************
|
|
43
|
+
* CONTEXTS *
|
|
44
|
+
************/
|
|
45
|
+
this.getRawContexts = commands_1.contexts.getRawContexts;
|
|
46
|
+
this.assertWebviewContext = commands_1.contexts.assertWebviewContext;
|
|
47
|
+
this.getCurrentContext = commands_1.contexts.getCurrentContext;
|
|
48
|
+
this.getContexts = commands_1.contexts.getContexts;
|
|
49
|
+
this.setContext = commands_1.contexts.setContext;
|
|
50
|
+
this.setFrame = commands_1.contexts.setFrame;
|
|
51
|
+
/************
|
|
52
|
+
* ELEMENTS *
|
|
53
|
+
************/
|
|
54
|
+
this.getElements = commands_1.element.getElements;
|
|
55
|
+
this.getElement = commands_1.element.getElement;
|
|
56
|
+
this.getName = commands_1.element.getName;
|
|
57
|
+
this.elementDisplayed = commands_1.element.elementDisplayed;
|
|
58
|
+
this.elementEnabled = commands_1.element.elementEnabled;
|
|
59
|
+
this.elementSelected = commands_1.element.elementSelected;
|
|
60
|
+
this.setValue = commands_1.element.setValue;
|
|
61
|
+
this.getText = commands_1.element.getText;
|
|
62
|
+
this.clear = commands_1.element.clear;
|
|
63
|
+
this.click = commands_1.element.click;
|
|
64
|
+
this.getAttribute = commands_1.element.getAttribute;
|
|
65
|
+
this.getElementRect = commands_1.element.getElementRect;
|
|
66
|
+
this.getSize = commands_1.element.getSize;
|
|
67
|
+
this.equalsElement = commands_1.element.equalsElement;
|
|
68
|
+
this.getCssProperty = commands_1.element.getCssProperty;
|
|
69
|
+
this.getLocation = commands_1.element.getLocation;
|
|
70
|
+
this.getLocationInView = commands_1.element.getLocationInView;
|
|
71
|
+
/********
|
|
72
|
+
* FIND *
|
|
73
|
+
********/
|
|
74
|
+
this.getExistingElementForNode = commands_1.find.getExistingElementForNode;
|
|
75
|
+
this.wrapNewEl = commands_1.find.wrapNewEl;
|
|
76
|
+
this.findElOrEls = commands_1.find.findElOrEls;
|
|
77
|
+
this.findElement = commands_1.find.findElement;
|
|
78
|
+
this.findElements = commands_1.find.findElements;
|
|
79
|
+
this.findElementFromElement = commands_1.find.findElementFromElement;
|
|
80
|
+
this.findElementsFromElement = commands_1.find.findElementsFromElement;
|
|
81
|
+
/***********
|
|
82
|
+
* GENERAL *
|
|
83
|
+
***********/
|
|
84
|
+
this.title = commands_1.general.title;
|
|
85
|
+
this.keys = commands_1.general.keys;
|
|
86
|
+
this.setGeoLocation = commands_1.general.setGeoLocation;
|
|
87
|
+
this.getGeoLocation = commands_1.general.getGeoLocation;
|
|
88
|
+
this.getPageSource = commands_1.general.getPageSource;
|
|
89
|
+
this.getOrientation = commands_1.general.getOrientation;
|
|
90
|
+
this.setOrientation = commands_1.general.setOrientation;
|
|
91
|
+
this.getScreenshot = commands_1.general.getScreenshot;
|
|
92
|
+
this.getWindowSize = commands_1.general.getWindowSize;
|
|
93
|
+
this.getWindowRect = commands_1.general.getWindowRect;
|
|
94
|
+
this.performActions = commands_1.general.performActions;
|
|
95
|
+
this.getLog = commands_1.general.getLog;
|
|
96
|
+
this.mobileShake = commands_1.general.mobileShake;
|
|
97
|
+
this.doubleClick = commands_1.general.doubleClick;
|
|
98
|
+
this.execute = commands_1.general.execute;
|
|
99
|
+
this.fakeAddition = commands_1.general.fakeAddition;
|
|
100
|
+
this.releaseActions = commands_1.general.releaseActions;
|
|
33
101
|
this.curContext = 'NATIVE_APP';
|
|
34
102
|
this.elMap = {};
|
|
35
103
|
this.focusedElId = null;
|
|
@@ -130,31 +198,19 @@ class FakeDriverCore extends driver_1.BaseDriver {
|
|
|
130
198
|
async callDeprecatedCommand() {
|
|
131
199
|
await bluebird_1.default.delay(1);
|
|
132
200
|
}
|
|
133
|
-
/**
|
|
134
|
-
* Add two or maybe even three numbers
|
|
135
|
-
*
|
|
136
|
-
* @param {number} num1
|
|
137
|
-
* @param {number} num2
|
|
138
|
-
* @param {number} [num3]
|
|
139
|
-
* @returns {Promise<number>}
|
|
140
|
-
*/
|
|
141
|
-
// eslint-disable-next-line no-unused-vars
|
|
142
|
-
async fakeAddition(num1, num2, num3 = 0) {
|
|
143
|
-
throw new driver_1.errors.NotImplementedError();
|
|
144
|
-
}
|
|
145
201
|
static fakeRoute(req, res) {
|
|
146
202
|
res.send(JSON.stringify({ fakedriver: 'fakeResponse' }));
|
|
147
203
|
}
|
|
148
204
|
static async updateServer(expressApp, httpServer, cliArgs) {
|
|
149
205
|
// eslint-disable-line require-await
|
|
150
|
-
expressApp.all('/fakedriver',
|
|
206
|
+
expressApp.all('/fakedriver', FakeDriver.fakeRoute);
|
|
151
207
|
expressApp.all('/fakedriverCliArgs', (req, res) => {
|
|
152
208
|
res.send(JSON.stringify(cliArgs));
|
|
153
209
|
});
|
|
154
210
|
}
|
|
155
211
|
}
|
|
156
|
-
exports.
|
|
157
|
-
|
|
212
|
+
exports.FakeDriver = FakeDriver;
|
|
213
|
+
FakeDriver.newMethodMap = ({
|
|
158
214
|
'/session/:sessionId/fakedriver': {
|
|
159
215
|
GET: { command: 'getFakeThing' },
|
|
160
216
|
/**
|
|
@@ -173,7 +229,7 @@ FakeDriverCore.newMethodMap = ({
|
|
|
173
229
|
POST: { command: 'doubleClick' },
|
|
174
230
|
},
|
|
175
231
|
});
|
|
176
|
-
|
|
232
|
+
FakeDriver.executeMethodMap = ({
|
|
177
233
|
'fake: addition': {
|
|
178
234
|
command: 'fakeAddition',
|
|
179
235
|
params: { required: ['num1', 'num2'], optional: ['num3'] },
|
|
@@ -192,12 +248,6 @@ FakeDriverCore.executeMethodMap = ({
|
|
|
192
248
|
command: 'getDeprecatedCommandsCalled',
|
|
193
249
|
},
|
|
194
250
|
});
|
|
195
|
-
/**
|
|
196
|
-
* @extends FakeDriverCore
|
|
197
|
-
*/
|
|
198
|
-
class FakeDriver extends (0, commands_1.FakeDriverMixin)(FakeDriverCore) {
|
|
199
|
-
}
|
|
200
|
-
exports.FakeDriver = FakeDriver;
|
|
201
251
|
exports.default = FakeDriver;
|
|
202
252
|
/**
|
|
203
253
|
* @typedef {import('./types').FakeDriverCaps} FakeDriverCaps
|
package/build/lib/driver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":";;;;;;AAAA,wDAAyB;AACzB,0CAAiD;AACjD,8EAAyF;AACzF,yCAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":";;;;;;AAAA,wDAAyB;AACzB,0CAAiD;AACjD,8EAAyF;AACzF,yCAAmC;AACnC,yCAAmE;AAEnE,MAAM,uBAAuB,GAAG,oBAAoB,CAAC,CAAC;IACpD,GAAG,EAAE;QACH,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE;QACT,SAAS,EAAE,IAAI;KAChB;CACF,CAAC,CAAC;AAEH;;GAEG;AAEH;;;GAGG;AACH,MAAa,UAAW,SAAQ,mBAAU;IAQxC,YAAY,IAAI,GAAG,EAAE,EAAE,kBAAkB,GAAG,IAAI;QAC9C,KAAK,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;QARlC,0BAAqB,GAAG,uBAAuB,CAAC;QAKhD,aAAQ,GAAG,IAAI,kBAAO,EAAE,CAAC;QA8KzB;;mBAEW;QACX,kBAAa,GAAG,gBAAK,CAAC,aAAa,CAAC;QACpC,gBAAW,GAAG,gBAAK,CAAC,WAAW,CAAC;QAChC,iBAAY,GAAG,gBAAK,CAAC,YAAY,CAAC;QAClC,iBAAY,GAAG,gBAAK,CAAC,YAAY,CAAC;QAClC,oBAAe,GAAG,gBAAK,CAAC,eAAe,CAAC;QACxC,qBAAgB,GAAG,gBAAK,CAAC,gBAAgB,CAAC;QAE1C;;sBAEc;QACd,mBAAc,GAAG,mBAAQ,CAAC,cAAc,CAAC;QACzC,yBAAoB,GAAG,mBAAQ,CAAC,oBAAoB,CAAC;QACrD,sBAAiB,GAAG,mBAAQ,CAAC,iBAAiB,CAAC;QAC/C,gBAAW,GAAG,mBAAQ,CAAC,WAAW,CAAC;QAC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
1
|
+
import type { DriverCaps, W3CDriverCaps } from '@appium/types';
|
|
2
2
|
import type { FakeDriverConstraints } from './driver';
|
|
3
|
-
import { FakeApp } from './fake-app';
|
|
4
|
-
import { FakeElement } from './fake-element';
|
|
5
3
|
/**
|
|
6
4
|
* W3C-style caps for {@link FakeDriver}
|
|
7
5
|
* @public
|
|
@@ -12,25 +10,4 @@ export declare type W3CFakeDriverCaps = W3CDriverCaps<FakeDriverConstraints>;
|
|
|
12
10
|
* @public
|
|
13
11
|
*/
|
|
14
12
|
export declare type FakeDriverCaps = DriverCaps<FakeDriverConstraints>;
|
|
15
|
-
export interface IFakeDriver extends ExternalDriver<FakeDriverConstraints> {
|
|
16
|
-
elMap: Record<string, FakeElement>;
|
|
17
|
-
maxElId: number;
|
|
18
|
-
appModel: FakeApp;
|
|
19
|
-
focusedElId: string;
|
|
20
|
-
curContext: string;
|
|
21
|
-
}
|
|
22
|
-
export interface IGeneralCommands extends IFakeDriver {
|
|
23
|
-
fakeAddition(num1: number, num2: number, num3?: number): Promise<number>;
|
|
24
|
-
}
|
|
25
|
-
export interface IContextsCommands extends IFakeDriver {
|
|
26
|
-
assertWebviewContext(): void;
|
|
27
|
-
}
|
|
28
|
-
export interface IElementCommands extends IFakeDriver {
|
|
29
|
-
getElement(id: string): FakeElement;
|
|
30
|
-
getElements(ids: string[]): FakeElement[];
|
|
31
|
-
setValue(text: string, id: string): Promise<void>;
|
|
32
|
-
}
|
|
33
|
-
export interface IAlertCommands extends IFakeDriver {
|
|
34
|
-
assertNoAlert(): void;
|
|
35
|
-
}
|
|
36
13
|
//# sourceMappingURL=types.d.ts.map
|
package/build/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,UAAU,CAAC;AAEpD;;;GAGG;AACH,oBAAY,iBAAiB,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAErE;;;GAGG;AACH,oBAAY,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC"}
|
package/lib/commands/alert.js
CHANGED
|
@@ -1,82 +1,73 @@
|
|
|
1
1
|
import {errors} from 'appium/driver';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
* @template {Class<import('../types').IContextsCommands & import('@appium/types').IFindCommands>} T
|
|
5
|
-
* @param {T} Base
|
|
6
|
-
* @returns {Class<AlertCommands>}
|
|
7
|
-
*/
|
|
8
|
-
export function AlertMixin(Base) {
|
|
3
|
+
export default {
|
|
9
4
|
/**
|
|
10
|
-
* @
|
|
5
|
+
* @this {FakeDriver}
|
|
11
6
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
throw new errors.UnexpectedAlertOpenError();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
assertAlert() {
|
|
20
|
-
if (!this.appModel.hasAlert()) {
|
|
21
|
-
throw new errors.NoAlertOpenError();
|
|
22
|
-
}
|
|
7
|
+
assertNoAlert() {
|
|
8
|
+
if (this.appModel.hasAlert()) {
|
|
9
|
+
throw new errors.UnexpectedAlertOpenError();
|
|
23
10
|
}
|
|
11
|
+
},
|
|
24
12
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this.assertAlert();
|
|
32
|
-
return this.appModel.alertText();
|
|
13
|
+
/**
|
|
14
|
+
* @this {FakeDriver}
|
|
15
|
+
*/
|
|
16
|
+
assertAlert() {
|
|
17
|
+
if (!this.appModel.hasAlert()) {
|
|
18
|
+
throw new errors.NoAlertOpenError();
|
|
33
19
|
}
|
|
20
|
+
},
|
|
34
21
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} catch (e) {
|
|
46
|
-
throw new errors.InvalidElementStateError();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
22
|
+
/**
|
|
23
|
+
* Get the text of an alert
|
|
24
|
+
*
|
|
25
|
+
* @returns {Promise<string>}
|
|
26
|
+
* @this {FakeDriver}
|
|
27
|
+
*/
|
|
28
|
+
async getAlertText() {
|
|
29
|
+
this.assertAlert();
|
|
30
|
+
return this.appModel.alertText();
|
|
31
|
+
},
|
|
49
32
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Set the text of an alert
|
|
35
|
+
*
|
|
36
|
+
* @param {string} text
|
|
37
|
+
* @returns {Promise<void>}
|
|
38
|
+
* @this {FakeDriver}
|
|
39
|
+
*/
|
|
40
|
+
async setAlertText(text) {
|
|
41
|
+
this.assertAlert();
|
|
42
|
+
try {
|
|
43
|
+
this.appModel.setAlertText(text);
|
|
44
|
+
} catch (e) {
|
|
45
|
+
throw new errors.InvalidElementStateError();
|
|
58
46
|
}
|
|
47
|
+
},
|
|
59
48
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @typedef {import('../driver').FakeDriverCore} FakeDriverCore
|
|
73
|
-
*/
|
|
49
|
+
/**
|
|
50
|
+
* Accept an alert
|
|
51
|
+
*
|
|
52
|
+
* @returns {Promise<void>}
|
|
53
|
+
* @this {FakeDriver}
|
|
54
|
+
*/
|
|
55
|
+
async postAcceptAlert() {
|
|
56
|
+
this.assertAlert();
|
|
57
|
+
this.appModel.handleAlert();
|
|
58
|
+
},
|
|
74
59
|
|
|
75
|
-
/**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Dismiss an alert
|
|
62
|
+
*
|
|
63
|
+
* @returns {Promise<void>}
|
|
64
|
+
* @this {FakeDriver}
|
|
65
|
+
*/
|
|
66
|
+
async postDismissAlert() {
|
|
67
|
+
return this.postAcceptAlert();
|
|
68
|
+
},
|
|
69
|
+
};
|
|
79
70
|
|
|
80
71
|
/**
|
|
81
|
-
* @typedef {import('../
|
|
72
|
+
* @typedef {import('../driver').FakeDriver} FakeDriver
|
|
82
73
|
*/
|