@rnw-community/wdio 0.12.0
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/LICENSE.md +21 -0
- package/dist/add-wdio-commands.d.ts +2 -0
- package/dist/add-wdio-commands.d.ts.map +1 -0
- package/dist/add-wdio-commands.js +85 -0
- package/dist/add-wdio-commands.js.map +1 -0
- package/dist/capability/index.d.ts +4 -0
- package/dist/capability/index.d.ts.map +1 -0
- package/dist/capability/index.js +20 -0
- package/dist/capability/index.js.map +1 -0
- package/dist/capability/is-android.capability.d.ts +2 -0
- package/dist/capability/is-android.capability.d.ts.map +1 -0
- package/dist/capability/is-android.capability.js +6 -0
- package/dist/capability/is-android.capability.js.map +1 -0
- package/dist/capability/is-browser.capability.d.ts +2 -0
- package/dist/capability/is-browser.capability.d.ts.map +1 -0
- package/dist/capability/is-browser.capability.js +8 -0
- package/dist/capability/is-browser.capability.js.map +1 -0
- package/dist/capability/is-ios.capability.d.ts +2 -0
- package/dist/capability/is-ios.capability.d.ts.map +1 -0
- package/dist/capability/is-ios.capability.js +8 -0
- package/dist/capability/is-ios.capability.js.map +1 -0
- package/dist/command/clear-input.command.d.ts +2 -0
- package/dist/command/clear-input.command.d.ts.map +1 -0
- package/dist/command/clear-input.command.js +66 -0
- package/dist/command/clear-input.command.js.map +1 -0
- package/dist/command/index.d.ts +8 -0
- package/dist/command/index.d.ts.map +1 -0
- package/dist/command/index.js +24 -0
- package/dist/command/index.js.map +1 -0
- package/dist/command/mobile/open-deep-link.command.d.ts +2 -0
- package/dist/command/mobile/open-deep-link.command.d.ts.map +1 -0
- package/dist/command/mobile/open-deep-link.command.js +85 -0
- package/dist/command/mobile/open-deep-link.command.js.map +1 -0
- package/dist/command/mobile/relative-click.command.d.ts +2 -0
- package/dist/command/mobile/relative-click.command.d.ts.map +1 -0
- package/dist/command/mobile/relative-click.command.js +62 -0
- package/dist/command/mobile/relative-click.command.js.map +1 -0
- package/dist/command/slow-input.command.d.ts +2 -0
- package/dist/command/slow-input.command.d.ts.map +1 -0
- package/dist/command/slow-input.command.js +94 -0
- package/dist/command/slow-input.command.js.map +1 -0
- package/dist/command/swipe.command.d.ts +8 -0
- package/dist/command/swipe.command.d.ts.map +1 -0
- package/dist/command/swipe.command.js +120 -0
- package/dist/command/swipe.command.js.map +1 -0
- package/dist/command/test-id-index.command.d.ts +3 -0
- package/dist/command/test-id-index.command.d.ts.map +1 -0
- package/dist/command/test-id-index.command.js +59 -0
- package/dist/command/test-id-index.command.js.map +1 -0
- package/dist/command/test-id.command.d.ts +3 -0
- package/dist/command/test-id.command.d.ts.map +1 -0
- package/dist/command/test-id.command.js +51 -0
- package/dist/command/test-id.command.js.map +1 -0
- package/dist/command/test-ids.command.d.ts +3 -0
- package/dist/command/test-ids.command.d.ts.map +1 -0
- package/dist/command/test-ids.command.js +51 -0
- package/dist/command/test-ids.command.js.map +1 -0
- package/dist/component/index.d.ts +2 -0
- package/dist/component/index.d.ts.map +1 -0
- package/dist/component/index.js +18 -0
- package/dist/component/index.js.map +1 -0
- package/dist/component/visible.component.d.ts +14 -0
- package/dist/component/visible.component.d.ts.map +1 -0
- package/dist/component/visible.component.js +146 -0
- package/dist/component/visible.component.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +18 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/web-selector.config.d.ts +2 -0
- package/dist/config/web-selector.config.d.ts.map +1 -0
- package/dist/config/web-selector.config.js +5 -0
- package/dist/config/web-selector.config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/interface/android-test-id-props.interface.d.ts +5 -0
- package/dist/interface/android-test-id-props.interface.d.ts.map +1 -0
- package/dist/interface/android-test-id-props.interface.js +3 -0
- package/dist/interface/android-test-id-props.interface.js.map +1 -0
- package/dist/interface/index.d.ts +4 -0
- package/dist/interface/index.d.ts.map +1 -0
- package/dist/interface/index.js +20 -0
- package/dist/interface/index.js.map +1 -0
- package/dist/interface/ios-test-id-props.interface.d.ts +4 -0
- package/dist/interface/ios-test-id-props.interface.d.ts.map +1 -0
- package/dist/interface/ios-test-id-props.interface.js +3 -0
- package/dist/interface/ios-test-id-props.interface.js.map +1 -0
- package/dist/interface/web-test-id-props.interface.d.ts +5 -0
- package/dist/interface/web-test-id-props.interface.d.ts.map +1 -0
- package/dist/interface/web-test-id-props.interface.js +3 -0
- package/dist/interface/web-test-id-props.interface.js.map +1 -0
- package/dist/selector/android-testid.selector.d.ts +2 -0
- package/dist/selector/android-testid.selector.d.ts.map +1 -0
- package/dist/selector/android-testid.selector.js +11 -0
- package/dist/selector/android-testid.selector.js.map +1 -0
- package/dist/selector/index.d.ts +6 -0
- package/dist/selector/index.d.ts.map +1 -0
- package/dist/selector/index.js +22 -0
- package/dist/selector/index.js.map +1 -0
- package/dist/selector/ios-testid.selector.d.ts +2 -0
- package/dist/selector/ios-testid.selector.d.ts.map +1 -0
- package/dist/selector/ios-testid.selector.js +10 -0
- package/dist/selector/ios-testid.selector.js.map +1 -0
- package/dist/selector/mobile-testid.selector.d.ts +2 -0
- package/dist/selector/mobile-testid.selector.d.ts.map +1 -0
- package/dist/selector/mobile-testid.selector.js +11 -0
- package/dist/selector/mobile-testid.selector.js.map +1 -0
- package/dist/selector/test-id.selector.d.ts +2 -0
- package/dist/selector/test-id.selector.d.ts.map +1 -0
- package/dist/selector/test-id.selector.js +11 -0
- package/dist/selector/test-id.selector.js.map +1 -0
- package/dist/selector/web-testid.selector.d.ts +2 -0
- package/dist/selector/web-testid.selector.d.ts.map +1 -0
- package/dist/selector/web-testid.selector.js +7 -0
- package/dist/selector/web-testid.selector.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/type/index.d.ts +3 -0
- package/dist/type/index.d.ts.map +1 -0
- package/dist/type/index.js +19 -0
- package/dist/type/index.js.map +1 -0
- package/dist/type/selector-context.type.d.ts +2 -0
- package/dist/type/selector-context.type.d.ts.map +1 -0
- package/dist/type/selector-context.type.js +3 -0
- package/dist/type/selector-context.type.js.map +1 -0
- package/dist/type/swipe-direction.type.d.ts +2 -0
- package/dist/type/swipe-direction.type.d.ts.map +1 -0
- package/dist/type/swipe-direction.type.js +3 -0
- package/dist/type/swipe-direction.type.js.map +1 -0
- package/dist/util/get-platform.util.d.ts +4 -0
- package/dist/util/get-platform.util.d.ts.map +1 -0
- package/dist/util/get-platform.util.js +15 -0
- package/dist/util/get-platform.util.js.map +1 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +18 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/set-test-id.d.ts +12 -0
- package/dist/util/set-test-id.d.ts.map +1 -0
- package/dist/util/set-test-id.js +31 -0
- package/dist/util/set-test-id.js.map +1 -0
- package/dist/wdio.d.ts +25 -0
- package/package.json +49 -0
- package/readme.md +33 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018-2021 Vitalii Yehorov and others
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-wdio-commands.d.ts","sourceRoot":"","sources":["../src/add-wdio-commands.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe,QAAO,IAiClC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.addWdioCommands = void 0;
|
|
40
|
+
var command_1 = require("./command");
|
|
41
|
+
var swipe_command_1 = require("./command/swipe.command");
|
|
42
|
+
var addWdioCommands = function () {
|
|
43
|
+
// HINT: Browser commands
|
|
44
|
+
browser.addCommand('testID$', command_1.testID$, false);
|
|
45
|
+
browser.addCommand('testID$$', command_1.testID$$, false);
|
|
46
|
+
browser.addCommand('testID$$Index', command_1.testID$$Index, false);
|
|
47
|
+
browser.addCommand('openDeepLink', command_1.openDeepLinkCommand, false);
|
|
48
|
+
// HINT: Element commands
|
|
49
|
+
browser.addCommand('testID$', function TestID$(testID) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
+
return __generator(this, function (_a) {
|
|
52
|
+
switch (_a.label) {
|
|
53
|
+
case 0: return [4 /*yield*/, (0, command_1.testID$)(testID, this)];
|
|
54
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}, true);
|
|
59
|
+
browser.addCommand('testID$$', function TestID$$(testID) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
+
return __generator(this, function (_a) {
|
|
62
|
+
switch (_a.label) {
|
|
63
|
+
case 0: return [4 /*yield*/, (0, command_1.testID$$)(testID, this)];
|
|
64
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}, true);
|
|
69
|
+
browser.addCommand('testID$$Index', function TestID$$Index(testID, idx) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
switch (_a.label) {
|
|
73
|
+
case 0: return [4 /*yield*/, (0, command_1.testID$$Index)(testID, idx, this)];
|
|
74
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}, true);
|
|
79
|
+
browser.addCommand('slowInput', command_1.slowInputCommand, true);
|
|
80
|
+
browser.addCommand('clearInput', command_1.clearInputCommand, true);
|
|
81
|
+
browser.addCommand('relativeClick', command_1.relativeClickCommand, true);
|
|
82
|
+
browser.addCommand('swipe', swipe_command_1.swipeCommand, true);
|
|
83
|
+
};
|
|
84
|
+
exports.addWdioCommands = addWdioCommands;
|
|
85
|
+
//# sourceMappingURL=add-wdio-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-wdio-commands.js","sourceRoot":"","sources":["../src/add-wdio-commands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAQmB;AACnB,yDAAuD;AAEhD,IAAM,eAAe,GAAG;IAC3B,yBAAyB;IACzB,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,iBAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,kBAAQ,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,uBAAa,EAAE,KAAK,CAAC,CAAC;IAC1D,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,6BAAmB,EAAE,KAAK,CAAC,CAAC;IAE/D,yBAAyB;IACzB,OAAO,CAAC,UAAU,CACd,SAAS,EACT,SAAe,OAAO,CAA4B,MAAc;;;;4BACrD,qBAAM,IAAA,iBAAO,EAAC,MAAM,EAAE,IAAI,CAAC,EAAA;4BAAlC,sBAAO,SAA2B,EAAC;;;;KACtC,EACD,IAAI,CACP,CAAC;IACF,OAAO,CAAC,UAAU,CACd,UAAU,EACV,SAAe,QAAQ,CAA4B,MAAc;;;;4BACtD,qBAAM,IAAA,kBAAQ,EAAC,MAAM,EAAE,IAAI,CAAC,EAAA;4BAAnC,sBAAO,SAA4B,EAAC;;;;KACvC,EACD,IAAI,CACP,CAAC;IACF,OAAO,CAAC,UAAU,CACd,eAAe,EACf,SAAe,aAAa,CAA4B,MAAc,EAAE,GAAW;;;;4BACxE,qBAAM,IAAA,uBAAa,EAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,EAAA;4BAA7C,sBAAO,SAAsC,EAAC;;;;KACjD,EACD,IAAI,CACP,CAAC;IACF,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,0BAAgB,EAAE,IAAI,CAAC,CAAC;IACxD,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,2BAAiB,EAAE,IAAI,CAAC,CAAC;IAC1D,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,8BAAoB,EAAE,IAAI,CAAC,CAAC;IAChE,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,4BAAY,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC,CAAC;AAjCW,QAAA,eAAe,mBAiC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/capability/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./is-android.capability"), exports);
|
|
18
|
+
__exportStar(require("./is-browser.capability"), exports);
|
|
19
|
+
__exportStar(require("./is-ios.capability"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capability/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,0DAAwC;AACxC,sDAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-android.capability.d.ts","sourceRoot":"","sources":["../../src/capability/is-android.capability.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,QAAO,OAA4B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isAndroidCapability = void 0;
|
|
4
|
+
var isAndroidCapability = function () { return browser.isAndroid; };
|
|
5
|
+
exports.isAndroidCapability = isAndroidCapability;
|
|
6
|
+
//# sourceMappingURL=is-android.capability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-android.capability.js","sourceRoot":"","sources":["../../src/capability/is-android.capability.ts"],"names":[],"mappings":";;;AAAO,IAAM,mBAAmB,GAAG,cAAe,OAAA,OAAO,CAAC,SAAS,EAAjB,CAAiB,CAAC;AAAvD,QAAA,mBAAmB,uBAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-browser.capability.d.ts","sourceRoot":"","sources":["../../src/capability/is-browser.capability.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,QAAO,OAC6C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isBrowserCapability = void 0;
|
|
4
|
+
var isBrowserCapability = function () {
|
|
5
|
+
return 'browserName' in browser.capabilities && browser.capabilities.browserName !== '';
|
|
6
|
+
};
|
|
7
|
+
exports.isBrowserCapability = isBrowserCapability;
|
|
8
|
+
//# sourceMappingURL=is-browser.capability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-browser.capability.js","sourceRoot":"","sources":["../../src/capability/is-browser.capability.ts"],"names":[],"mappings":";;;AAAO,IAAM,mBAAmB,GAAG;IAC/B,OAAA,aAAa,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,WAAW,KAAK,EAAE;AAAhF,CAAgF,CAAC;AADxE,QAAA,mBAAmB,uBACqD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-ios.capability.d.ts","sourceRoot":"","sources":["../../src/capability/is-ios.capability.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,QAAO,OAA2D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isIOSCapability = void 0;
|
|
4
|
+
var is_android_capability_1 = require("./is-android.capability");
|
|
5
|
+
var is_browser_capability_1 = require("./is-browser.capability");
|
|
6
|
+
var isIOSCapability = function () { return !(0, is_browser_capability_1.isBrowserCapability)() && !(0, is_android_capability_1.isAndroidCapability)(); };
|
|
7
|
+
exports.isIOSCapability = isIOSCapability;
|
|
8
|
+
//# sourceMappingURL=is-ios.capability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-ios.capability.js","sourceRoot":"","sources":["../../src/capability/is-ios.capability.ts"],"names":[],"mappings":";;;AAAA,iEAA8D;AAC9D,iEAA8D;AAEvD,IAAM,eAAe,GAAG,cAAe,OAAA,CAAC,IAAA,2CAAmB,GAAE,IAAI,CAAC,IAAA,2CAAmB,GAAE,EAAhD,CAAgD,CAAC;AAAlF,QAAA,eAAe,mBAAmE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-input.command.d.ts","sourceRoot":"","sources":["../../src/command/clear-input.command.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,YAAmB,YAAY,OAAO,KAAG,QAAQ,IAAI,CASlF,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.clearInputCommand = void 0;
|
|
40
|
+
var clearInputCommand = function (element) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
+
var currentText;
|
|
42
|
+
return __generator(this, function (_a) {
|
|
43
|
+
switch (_a.label) {
|
|
44
|
+
case 0:
|
|
45
|
+
// HINT: Not working
|
|
46
|
+
return [4 /*yield*/, element.clearValue()];
|
|
47
|
+
case 1:
|
|
48
|
+
// HINT: Not working
|
|
49
|
+
_a.sent();
|
|
50
|
+
// HINT: Not working
|
|
51
|
+
return [4 /*yield*/, element.setValue('')];
|
|
52
|
+
case 2:
|
|
53
|
+
// HINT: Not working
|
|
54
|
+
_a.sent();
|
|
55
|
+
return [4 /*yield*/, element.getText()];
|
|
56
|
+
case 3:
|
|
57
|
+
currentText = _a.sent();
|
|
58
|
+
return [4 /*yield*/, element.sendKeys(Array(currentText.length).fill('\ue017'))];
|
|
59
|
+
case 4:
|
|
60
|
+
_a.sent();
|
|
61
|
+
return [2 /*return*/];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}); };
|
|
65
|
+
exports.clearInputCommand = clearInputCommand;
|
|
66
|
+
//# sourceMappingURL=clear-input.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-input.command.js","sourceRoot":"","sources":["../../src/command/clear-input.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAM,iBAAiB,GAAG,UAAO,OAA4B;;;;;YAChE,oBAAoB;YACpB,qBAAM,OAAO,CAAC,UAAU,EAAE,EAAA;;gBAD1B,oBAAoB;gBACpB,SAA0B,CAAC;gBAC3B,oBAAoB;gBACpB,qBAAM,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAA;;gBAD1B,oBAAoB;gBACpB,SAA0B,CAAC;gBAEP,qBAAM,OAAO,CAAC,OAAO,EAAE,EAAA;;gBAArC,WAAW,GAAG,SAAuB;gBAE3C,qBAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAa,CAAC,EAAA;;gBAA5E,SAA4E,CAAC;;;;KAChF,CAAC;AATW,QAAA,iBAAiB,qBAS5B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './test-id.command';
|
|
2
|
+
export * from './test-ids.command';
|
|
3
|
+
export * from './test-id-index.command';
|
|
4
|
+
export * from './slow-input.command';
|
|
5
|
+
export * from './clear-input.command';
|
|
6
|
+
export * from './mobile/open-deep-link.command';
|
|
7
|
+
export * from './mobile/relative-click.command';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./test-id.command"), exports);
|
|
18
|
+
__exportStar(require("./test-ids.command"), exports);
|
|
19
|
+
__exportStar(require("./test-id-index.command"), exports);
|
|
20
|
+
__exportStar(require("./slow-input.command"), exports);
|
|
21
|
+
__exportStar(require("./clear-input.command"), exports);
|
|
22
|
+
__exportStar(require("./mobile/open-deep-link.command"), exports);
|
|
23
|
+
__exportStar(require("./mobile/relative-click.command"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AACxC,uDAAqC;AACrC,wDAAsC;AAEtC,kEAAgD;AAChD,kEAAgD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-deep-link.command.d.ts","sourceRoot":"","sources":["../../../src/command/mobile/open-deep-link.command.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB,QAAe,MAAM,UAAU,MAAM,eAAe,MAAM,KAAG,QAAQ,IAAI,CAgBxG,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.openDeepLinkCommand = void 0;
|
|
40
|
+
/**
|
|
41
|
+
* Create a cross platform solution for opening a deep link
|
|
42
|
+
*
|
|
43
|
+
* @param {string} url
|
|
44
|
+
*/
|
|
45
|
+
var capability_1 = require("../../capability");
|
|
46
|
+
var openDeepLinkCommand = function (url, prefix, packageName) { return __awaiter(void 0, void 0, void 0, function () {
|
|
47
|
+
var urlButtonSelector, urlFieldSelector, urlButton, urlField;
|
|
48
|
+
return __generator(this, function (_a) {
|
|
49
|
+
switch (_a.label) {
|
|
50
|
+
case 0:
|
|
51
|
+
if (!(0, capability_1.isAndroidCapability)()) return [3 /*break*/, 2];
|
|
52
|
+
// TODO: can we use this browser.capabilities.appPackage ?
|
|
53
|
+
return [4 /*yield*/, driver.execute('mobile:deepLink', { url: "".concat(prefix).concat(url), package: packageName })];
|
|
54
|
+
case 1:
|
|
55
|
+
// TODO: can we use this browser.capabilities.appPackage ?
|
|
56
|
+
_a.sent();
|
|
57
|
+
return [3 /*break*/, 8];
|
|
58
|
+
case 2:
|
|
59
|
+
if (!(0, capability_1.isIOSCapability)()) return [3 /*break*/, 8];
|
|
60
|
+
// TODO: Find better IOS implementation
|
|
61
|
+
return [4 /*yield*/, driver.execute('mobile: launchApp', { bundleId: 'com.apple.mobilesafari' })];
|
|
62
|
+
case 3:
|
|
63
|
+
// TODO: Find better IOS implementation
|
|
64
|
+
_a.sent();
|
|
65
|
+
urlButtonSelector = "type == 'XCUIElementTypeButton' && name CONTAINS 'URL'";
|
|
66
|
+
urlFieldSelector = "type == 'XCUIElementTypeTextField' && name CONTAINS 'URL'";
|
|
67
|
+
return [4 /*yield*/, $("-ios predicate string:".concat(urlButtonSelector))];
|
|
68
|
+
case 4:
|
|
69
|
+
urlButton = _a.sent();
|
|
70
|
+
return [4 /*yield*/, $("-ios predicate string:".concat(urlFieldSelector))];
|
|
71
|
+
case 5:
|
|
72
|
+
urlField = _a.sent();
|
|
73
|
+
return [4 /*yield*/, urlButton.click()];
|
|
74
|
+
case 6:
|
|
75
|
+
_a.sent();
|
|
76
|
+
return [4 /*yield*/, urlField.setValue("".concat(prefix).concat(url, "\uE007"))];
|
|
77
|
+
case 7:
|
|
78
|
+
_a.sent();
|
|
79
|
+
_a.label = 8;
|
|
80
|
+
case 8: return [2 /*return*/];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}); };
|
|
84
|
+
exports.openDeepLinkCommand = openDeepLinkCommand;
|
|
85
|
+
//# sourceMappingURL=open-deep-link.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-deep-link.command.js","sourceRoot":"","sources":["../../../src/command/mobile/open-deep-link.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,+CAAwE;AAEjE,IAAM,mBAAmB,GAAG,UAAO,GAAW,EAAE,MAAc,EAAE,WAAmB;;;;;qBAClF,IAAA,gCAAmB,GAAE,EAArB,wBAAqB;gBACrB,0DAA0D;gBAC1D,qBAAM,MAAM,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,GAAG,EAAE,UAAG,MAAM,SAAG,GAAG,CAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,EAAA;;gBADzF,0DAA0D;gBAC1D,SAAyF,CAAC;;;qBACnF,IAAA,4BAAe,GAAE,EAAjB,wBAAiB;gBACxB,uCAAuC;gBACvC,qBAAM,MAAM,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,wBAAwB,EAAE,CAAC,EAAA;;gBADjF,uCAAuC;gBACvC,SAAiF,CAAC;gBAE5E,iBAAiB,GAAG,wDAAwD,CAAC;gBAC7E,gBAAgB,GAAG,2DAA2D,CAAC;gBACnE,qBAAM,CAAC,CAAC,gCAAyB,iBAAiB,CAAE,CAAC,EAAA;;gBAAjE,SAAS,GAAG,SAAqD;gBACtD,qBAAM,CAAC,CAAC,gCAAyB,gBAAgB,CAAE,CAAC,EAAA;;gBAA/D,QAAQ,GAAG,SAAoD;gBAErE,qBAAM,SAAS,CAAC,KAAK,EAAE,EAAA;;gBAAvB,SAAuB,CAAC;gBACxB,qBAAM,QAAQ,CAAC,QAAQ,CAAC,UAAG,MAAM,SAAG,GAAG,WAAQ,CAAC,EAAA;;gBAAhD,SAAgD,CAAC;;;;;KAExD,CAAC;AAhBW,QAAA,mBAAmB,uBAgB9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relative-click.command.d.ts","sourceRoot":"","sources":["../../../src/command/mobile/relative-click.command.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,YACpB,YAAY,OAAO,YAClB,MAAM,YACN,MAAM,KACjB,QAAQ,IAAI,CAQd,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.relativeClickCommand = void 0;
|
|
40
|
+
var ONE_HUNDRED_PERCENT = 100;
|
|
41
|
+
var relativeClickCommand = function relativeClickCommand(element, xPercent, yPercent) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
+
var size;
|
|
44
|
+
return __generator(this, function (_a) {
|
|
45
|
+
switch (_a.label) {
|
|
46
|
+
case 0: return [4 /*yield*/, element.getSize()];
|
|
47
|
+
case 1:
|
|
48
|
+
size = _a.sent();
|
|
49
|
+
return [4 /*yield*/, element.touchAction({
|
|
50
|
+
action: 'tap',
|
|
51
|
+
x: (size.width * xPercent) / ONE_HUNDRED_PERCENT,
|
|
52
|
+
y: (size.height * yPercent) / ONE_HUNDRED_PERCENT,
|
|
53
|
+
})];
|
|
54
|
+
case 2:
|
|
55
|
+
_a.sent();
|
|
56
|
+
return [2 /*return*/];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
exports.relativeClickCommand = relativeClickCommand;
|
|
62
|
+
//# sourceMappingURL=relative-click.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relative-click.command.js","sourceRoot":"","sources":["../../../src/command/mobile/relative-click.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,mBAAmB,GAAG,GAAG,CAAC;AAEzB,IAAM,oBAAoB,GAAG,SAAe,oBAAoB,CACnE,OAA4B,EAC5B,QAAgB,EAChB,QAAgB;;;;;wBAEH,qBAAM,OAAO,CAAC,OAAO,EAAE,EAAA;;oBAA9B,IAAI,GAAG,SAAuB;oBAEpC,qBAAM,OAAO,CAAC,WAAW,CAAC;4BACtB,MAAM,EAAE,KAAK;4BACb,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,mBAAmB;4BAChD,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG,mBAAmB;yBACpD,CAAC,EAAA;;oBAJF,SAIE,CAAC;;;;;CACN,CAAC;AAZW,QAAA,oBAAoB,wBAY/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slow-input.command.d.ts","sourceRoot":"","sources":["../../src/command/slow-input.command.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,OACrB,YAAY,OAAO,SAChB,MAAM,qBAEd,QAAQ,IAAI,CAKd,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
39
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
40
|
+
var m = o[Symbol.asyncIterator], i;
|
|
41
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
42
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
43
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.slowInputCommand = void 0;
|
|
47
|
+
var DEFAULT_INPUT_DELAY = 300;
|
|
48
|
+
var slowInputCommand = function (el, value, delay) {
|
|
49
|
+
if (delay === void 0) { delay = DEFAULT_INPUT_DELAY; }
|
|
50
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
51
|
+
var _a, _b, char, e_1_1;
|
|
52
|
+
var e_1, _c;
|
|
53
|
+
return __generator(this, function (_d) {
|
|
54
|
+
switch (_d.label) {
|
|
55
|
+
case 0:
|
|
56
|
+
_d.trys.push([0, 7, 8, 13]);
|
|
57
|
+
_a = __asyncValues(value.split(''));
|
|
58
|
+
_d.label = 1;
|
|
59
|
+
case 1: return [4 /*yield*/, _a.next()];
|
|
60
|
+
case 2:
|
|
61
|
+
if (!(_b = _d.sent(), !_b.done)) return [3 /*break*/, 6];
|
|
62
|
+
char = _b.value;
|
|
63
|
+
return [4 /*yield*/, browser.pause(delay)];
|
|
64
|
+
case 3:
|
|
65
|
+
_d.sent();
|
|
66
|
+
return [4 /*yield*/, el.addValue(char)];
|
|
67
|
+
case 4:
|
|
68
|
+
_d.sent();
|
|
69
|
+
_d.label = 5;
|
|
70
|
+
case 5: return [3 /*break*/, 1];
|
|
71
|
+
case 6: return [3 /*break*/, 13];
|
|
72
|
+
case 7:
|
|
73
|
+
e_1_1 = _d.sent();
|
|
74
|
+
e_1 = { error: e_1_1 };
|
|
75
|
+
return [3 /*break*/, 13];
|
|
76
|
+
case 8:
|
|
77
|
+
_d.trys.push([8, , 11, 12]);
|
|
78
|
+
if (!(_b && !_b.done && (_c = _a.return))) return [3 /*break*/, 10];
|
|
79
|
+
return [4 /*yield*/, _c.call(_a)];
|
|
80
|
+
case 9:
|
|
81
|
+
_d.sent();
|
|
82
|
+
_d.label = 10;
|
|
83
|
+
case 10: return [3 /*break*/, 12];
|
|
84
|
+
case 11:
|
|
85
|
+
if (e_1) throw e_1.error;
|
|
86
|
+
return [7 /*endfinally*/];
|
|
87
|
+
case 12: return [7 /*endfinally*/];
|
|
88
|
+
case 13: return [2 /*return*/];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
exports.slowInputCommand = slowInputCommand;
|
|
94
|
+
//# sourceMappingURL=slow-input.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slow-input.command.js","sourceRoot":"","sources":["../../src/command/slow-input.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,mBAAmB,GAAG,GAAG,CAAC;AAEzB,IAAM,gBAAgB,GAAG,UAC5B,EAAuB,EACvB,KAAa,EACb,KAA2B;IAA3B,sBAAA,EAAA,2BAA2B;;;;;;;;oBAEF,KAAA,cAAA,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;;;;;oBAAvB,IAAI,WAAA,CAAA;oBACjB,qBAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAA;;oBAA1B,SAA0B,CAAC;oBAC3B,qBAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAA;;oBAAvB,SAAuB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;CAE/B,CAAC;AATW,QAAA,gBAAgB,oBAS3B"}
|