appium-safari-driver 3.4.0 → 3.5.1
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/.eslintrc.json +15 -3
- package/.mocharc.js +1 -1
- package/CHANGELOG.md +19 -0
- package/build/index.d.ts +4 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +9 -17
- package/build/index.js.map +1 -1
- package/build/lib/commands/cookies.d.ts +5 -0
- package/build/lib/commands/cookies.d.ts.map +1 -0
- package/build/lib/commands/cookies.js +5 -10
- package/build/lib/commands/cookies.js.map +1 -1
- package/build/lib/commands/find.d.ts +5 -0
- package/build/lib/commands/find.d.ts.map +1 -0
- package/build/lib/commands/find.js +12 -16
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/index.d.ts +3 -0
- package/build/lib/commands/index.d.ts.map +1 -0
- package/build/lib/commands/index.js +11 -14
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/commands/record-screen.d.ts +121 -0
- package/build/lib/commands/record-screen.d.ts.map +1 -0
- package/build/lib/commands/record-screen.js +273 -230
- package/build/lib/commands/record-screen.js.map +1 -1
- package/build/lib/desired-caps.d.ts +39 -0
- package/build/lib/desired-caps.d.ts.map +1 -0
- package/build/lib/desired-caps.js +38 -42
- package/build/lib/desired-caps.js.map +1 -1
- package/build/lib/driver.d.ts +74 -0
- package/build/lib/driver.d.ts.map +1 -0
- package/build/lib/driver.js +80 -63
- package/build/lib/driver.js.map +1 -1
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +5 -11
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.d.ts +19 -0
- package/build/lib/method-map.d.ts.map +1 -0
- package/build/lib/method-map.js +16 -25
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/safari.d.ts +16 -0
- package/build/lib/safari.d.ts.map +1 -0
- package/build/lib/safari.js +148 -138
- package/build/lib/safari.js.map +1 -1
- package/build/lib/utils.d.ts +6 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +23 -22
- package/build/lib/utils.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/lib/commands/record-screen.js +29 -21
- package/lib/driver.js +8 -2
- package/lib/safari.js +11 -6
- package/lib/utils.js +1 -0
- package/npm-shrinkwrap.json +530 -860
- package/package.json +30 -19
- package/test/functional/desktop-driver-e2e-specs.js +2 -2
- package/test/functional/mobile-driver-e2e-specs.js +2 -2
- package/tsconfig.json +14 -0
- package/babel.config.json +0 -25
package/.eslintrc.json
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "@appium/eslint-config-appium",
|
|
2
|
+
"extends": ["@appium/eslint-config-appium-ts"],
|
|
3
3
|
"overrides": [
|
|
4
4
|
{
|
|
5
5
|
"files": "test/**/*.js",
|
|
6
6
|
"rules": {
|
|
7
|
-
"func-names": "off"
|
|
7
|
+
"func-names": "off",
|
|
8
|
+
"@typescript-eslint/no-var-requires": "off"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"files": "scripts/**/*",
|
|
13
|
+
"parserOptions": {"sourceType": "script"},
|
|
14
|
+
"rules": {
|
|
15
|
+
"@typescript-eslint/no-var-requires": "off"
|
|
8
16
|
}
|
|
9
17
|
}
|
|
10
|
-
]
|
|
18
|
+
],
|
|
19
|
+
"rules": {
|
|
20
|
+
"require-await": "error"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/.mocharc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [3.5.1](https://github.com/appium/appium-safari-driver/compare/v3.5.0...v3.5.1) (2023-08-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* **deps-dev:** bump semantic-release from 20.1.3 to 21.1.0 ([#69](https://github.com/appium/appium-safari-driver/issues/69)) ([2e363e1](https://github.com/appium/appium-safari-driver/commit/2e363e18d3215ebb5b26fb8bc59ceaf47fb3b071))
|
|
7
|
+
|
|
8
|
+
## [3.5.0](https://github.com/appium/appium-safari-driver/compare/v3.4.0...v3.5.0) (2023-08-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Switch babel to typescript ([#65](https://github.com/appium/appium-safari-driver/issues/65)) ([e49d833](https://github.com/appium/appium-safari-driver/commit/e49d833c5d3b7d7dd52a9e36f4ee602eb0952c49))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Miscellaneous Chores
|
|
17
|
+
|
|
18
|
+
* **deps-dev:** bump lint-staged from 13.3.0 to 14.0.0 ([#64](https://github.com/appium/appium-safari-driver/issues/64)) ([67a4e75](https://github.com/appium/appium-safari-driver/commit/67a4e75606122166ad206a4ced07491b9a7fac86))
|
|
19
|
+
|
|
1
20
|
## [3.4.0](https://github.com/appium/appium-safari-driver/compare/v3.3.4...v3.4.0) (2023-07-14)
|
|
2
21
|
|
|
3
22
|
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";;yBAAyB,cAAc"}
|
package/build/index.js
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
exports.default = void 0;
|
|
14
|
-
require("source-map-support/register");
|
|
15
|
-
var _driver = _interopRequireDefault(require("./lib/driver"));
|
|
16
|
-
var _default = _driver.default;
|
|
17
|
-
exports.default = _default;
|
|
18
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfZHJpdmVyIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfZGVmYXVsdCIsIlNhZmFyaURyaXZlciIsImV4cG9ydHMiLCJkZWZhdWx0Il0sInNvdXJjZXMiOlsiLi4vaW5kZXguanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFNhZmFyaURyaXZlciBmcm9tICcuL2xpYi9kcml2ZXInO1xuXG5leHBvcnQgZGVmYXVsdCBTYWZhcmlEcml2ZXI7XG5leHBvcnQgeyBTYWZhcmlEcml2ZXIgfTtcbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFBQSxJQUFBQSxPQUFBLEdBQUFDLHNCQUFBLENBQUFDLE9BQUE7QUFBd0MsSUFBQUMsUUFBQSxHQUV6QkMsZUFBWTtBQUFBQyxPQUFBLENBQUFDLE9BQUEsR0FBQUgsUUFBQSJ9
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SafariDriver = void 0;
|
|
7
|
+
const driver_1 = __importDefault(require("./lib/driver"));
|
|
8
|
+
exports.SafariDriver = driver_1.default;
|
|
9
|
+
exports.default = driver_1.default;
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";;;;;;AAAA,0DAAwC;AAG/B,uBAHF,gBAAY,CAGE;AADrB,kBAAe,gBAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookies.d.ts","sourceRoot":"","sources":["../../../lib/commands/cookies.js"],"names":[],"mappings":";;IAEA,uCAEC"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.commands = void 0;
|
|
7
|
-
require("source-map-support/register");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commands = void 0;
|
|
8
4
|
const commands = {};
|
|
9
5
|
exports.commands = commands;
|
|
10
6
|
commands.deleteCookies = async function deleteCookies() {
|
|
11
|
-
|
|
7
|
+
return await this.safari.proxy.command('/cookie', 'DELETE');
|
|
12
8
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb21tYW5kcyIsImV4cG9ydHMiLCJkZWxldGVDb29raWVzIiwic2FmYXJpIiwicHJveHkiLCJjb21tYW5kIiwiX2RlZmF1bHQiLCJkZWZhdWx0Il0sInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL2NvbW1hbmRzL2Nvb2tpZXMuanMiXSwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgY29tbWFuZHMgPSB7fTtcblxuY29tbWFuZHMuZGVsZXRlQ29va2llcyA9IGFzeW5jIGZ1bmN0aW9uIGRlbGV0ZUNvb2tpZXMgKCkge1xuICByZXR1cm4gYXdhaXQgdGhpcy5zYWZhcmkucHJveHkuY29tbWFuZCgnL2Nvb2tpZScsICdERUxFVEUnKTtcbn07XG5cbmV4cG9ydCB7IGNvbW1hbmRzIH07XG5leHBvcnQgZGVmYXVsdCBjb21tYW5kcztcbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBLE1BQU1BLFFBQVEsR0FBRyxDQUFDLENBQUM7QUFBQ0MsT0FBQSxDQUFBRCxRQUFBLEdBQUFBLFFBQUE7QUFFcEJBLFFBQVEsQ0FBQ0UsYUFBYSxHQUFHLGVBQWVBLGFBQWFBLENBQUEsRUFBSTtFQUN2RCxPQUFPLE1BQU0sSUFBSSxDQUFDQyxNQUFNLENBQUNDLEtBQUssQ0FBQ0MsT0FBTyxDQUFDLFNBQVMsRUFBRSxRQUFRLENBQUM7QUFDN0QsQ0FBQztBQUFDLElBQUFDLFFBQUEsR0FHYU4sUUFBUTtBQUFBQyxPQUFBLENBQUFNLE9BQUEsR0FBQUQsUUFBQSJ9
|
|
9
|
+
exports.default = commands;
|
|
10
|
+
//# sourceMappingURL=cookies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookies.js","
|
|
1
|
+
{"version":3,"file":"cookies.js","sourceRoot":"","sources":["../../../lib/commands/cookies.js"],"names":[],"mappings":";;;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AAMX,4BAAQ;AAJjB,QAAQ,CAAC,aAAa,GAAG,KAAK,UAAU,aAAa;IACnD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAC9D,CAAC,CAAC;AAGF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../lib/commands/find.js"],"names":[],"mappings":";;IAMA,0FAQC"}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.commands = void 0;
|
|
7
|
-
require("source-map-support/register");
|
|
8
|
-
var _support = require("appium/support");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commands = void 0;
|
|
4
|
+
const support_1 = require("appium/support");
|
|
9
5
|
const commands = {};
|
|
10
6
|
exports.commands = commands;
|
|
7
|
+
// This is needed to make lookup by image working
|
|
11
8
|
commands.findElOrEls = async function findElOrEls(strategy, selector, mult, context) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
context = support_1.util.unwrapElement(context);
|
|
10
|
+
const endpoint = `/element${context ? `/${context}/element` : ''}${mult ? 's' : ''}`;
|
|
11
|
+
return await this.safari.proxy.command(endpoint, 'POST', {
|
|
12
|
+
using: strategy,
|
|
13
|
+
value: selector,
|
|
14
|
+
});
|
|
18
15
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfc3VwcG9ydCIsInJlcXVpcmUiLCJjb21tYW5kcyIsImV4cG9ydHMiLCJmaW5kRWxPckVscyIsInN0cmF0ZWd5Iiwic2VsZWN0b3IiLCJtdWx0IiwiY29udGV4dCIsInV0aWwiLCJ1bndyYXBFbGVtZW50IiwiZW5kcG9pbnQiLCJzYWZhcmkiLCJwcm94eSIsImNvbW1hbmQiLCJ1c2luZyIsInZhbHVlIiwiX2RlZmF1bHQiLCJkZWZhdWx0Il0sInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL2NvbW1hbmRzL2ZpbmQuanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdXRpbCB9IGZyb20gJ2FwcGl1bS9zdXBwb3J0JztcblxuXG5jb25zdCBjb21tYW5kcyA9IHt9O1xuXG4vLyBUaGlzIGlzIG5lZWRlZCB0byBtYWtlIGxvb2t1cCBieSBpbWFnZSB3b3JraW5nXG5jb21tYW5kcy5maW5kRWxPckVscyA9IGFzeW5jIGZ1bmN0aW9uIGZpbmRFbE9yRWxzIChzdHJhdGVneSwgc2VsZWN0b3IsIG11bHQsIGNvbnRleHQpIHtcbiAgY29udGV4dCA9IHV0aWwudW53cmFwRWxlbWVudChjb250ZXh0KTtcbiAgY29uc3QgZW5kcG9pbnQgPSBgL2VsZW1lbnQke2NvbnRleHQgPyBgLyR7Y29udGV4dH0vZWxlbWVudGAgOiAnJ30ke211bHQgPyAncycgOiAnJ31gO1xuXG4gIHJldHVybiBhd2FpdCB0aGlzLnNhZmFyaS5wcm94eS5jb21tYW5kKGVuZHBvaW50LCAnUE9TVCcsIHtcbiAgICB1c2luZzogc3RyYXRlZ3ksXG4gICAgdmFsdWU6IHNlbGVjdG9yLFxuICB9KTtcbn07XG5cblxuZXhwb3J0IHsgY29tbWFuZHMgfTtcbmV4cG9ydCBkZWZhdWx0IGNvbW1hbmRzO1xuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsSUFBQUEsUUFBQSxHQUFBQyxPQUFBO0FBR0EsTUFBTUMsUUFBUSxHQUFHLENBQUMsQ0FBQztBQUFDQyxPQUFBLENBQUFELFFBQUEsR0FBQUEsUUFBQTtBQUdwQkEsUUFBUSxDQUFDRSxXQUFXLEdBQUcsZUFBZUEsV0FBV0EsQ0FBRUMsUUFBUSxFQUFFQyxRQUFRLEVBQUVDLElBQUksRUFBRUMsT0FBTyxFQUFFO0VBQ3BGQSxPQUFPLEdBQUdDLGFBQUksQ0FBQ0MsYUFBYSxDQUFDRixPQUFPLENBQUM7RUFDckMsTUFBTUcsUUFBUSxHQUFJLFdBQVVILE9BQU8sR0FBSSxJQUFHQSxPQUFRLFVBQVMsR0FBRyxFQUFHLEdBQUVELElBQUksR0FBRyxHQUFHLEdBQUcsRUFBRyxFQUFDO0VBRXBGLE9BQU8sTUFBTSxJQUFJLENBQUNLLE1BQU0sQ0FBQ0MsS0FBSyxDQUFDQyxPQUFPLENBQUNILFFBQVEsRUFBRSxNQUFNLEVBQUU7SUFDdkRJLEtBQUssRUFBRVYsUUFBUTtJQUNmVyxLQUFLLEVBQUVWO0VBQ1QsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQUFDLElBQUFXLFFBQUEsR0FJYWYsUUFBUTtBQUFBQyxPQUFBLENBQUFlLE9BQUEsR0FBQUQsUUFBQSJ9
|
|
16
|
+
exports.default = commands;
|
|
17
|
+
//# sourceMappingURL=find.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.js","
|
|
1
|
+
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../lib/commands/find.js"],"names":[],"mappings":";;;AAAA,4CAAsC;AAGtC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAcX,4BAAQ;AAZjB,iDAAiD;AACjD,QAAQ,CAAC,WAAW,GAAG,KAAK,UAAU,WAAW,CAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO;IAClF,OAAO,GAAG,cAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,QAAQ,GAAG,WAAW,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAErF,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE;QACvD,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,QAAQ;KAChB,CAAC,CAAC;AACL,CAAC,CAAC;AAIF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":";AAIA,0BAAoB"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
require("
|
|
9
|
-
|
|
10
|
-
var _cookies = _interopRequireDefault(require("./cookies"));
|
|
11
|
-
var _recordScreen = _interopRequireDefault(require("./record-screen"));
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.commands = void 0;
|
|
7
|
+
const find_1 = __importDefault(require("./find"));
|
|
8
|
+
const cookies_1 = __importDefault(require("./cookies"));
|
|
9
|
+
const record_screen_1 = __importDefault(require("./record-screen"));
|
|
12
10
|
const commands = {};
|
|
13
11
|
exports.commands = commands;
|
|
14
|
-
Object.assign(commands,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfZmluZCIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2Nvb2tpZXMiLCJfcmVjb3JkU2NyZWVuIiwiY29tbWFuZHMiLCJleHBvcnRzIiwiT2JqZWN0IiwiYXNzaWduIiwiZmluZENtZHMiLCJjb29raWVDbWRzIiwicmVjb3JkU2NyZWVuQ29tbWFuZHMiLCJfZGVmYXVsdCIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvY29tbWFuZHMvaW5kZXguanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGZpbmRDbWRzIGZyb20gJy4vZmluZCc7XG5pbXBvcnQgY29va2llQ21kcyBmcm9tICcuL2Nvb2tpZXMnO1xuaW1wb3J0IHJlY29yZFNjcmVlbkNvbW1hbmRzIGZyb20gJy4vcmVjb3JkLXNjcmVlbic7XG5cbmNvbnN0IGNvbW1hbmRzID0ge307XG5PYmplY3QuYXNzaWduKFxuICBjb21tYW5kcyxcbiAgZmluZENtZHMsXG4gIGNvb2tpZUNtZHMsXG4gIHJlY29yZFNjcmVlbkNvbW1hbmRzLFxuICAvLyBhZGQgb3RoZXIgY29tbWFuZCB0eXBlcyBoZXJlXG4pO1xuXG5leHBvcnQgeyBjb21tYW5kcyB9O1xuZXhwb3J0IGRlZmF1bHQgY29tbWFuZHM7XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUEsSUFBQUEsS0FBQSxHQUFBQyxzQkFBQSxDQUFBQyxPQUFBO0FBQ0EsSUFBQUMsUUFBQSxHQUFBRixzQkFBQSxDQUFBQyxPQUFBO0FBQ0EsSUFBQUUsYUFBQSxHQUFBSCxzQkFBQSxDQUFBQyxPQUFBO0FBRUEsTUFBTUcsUUFBUSxHQUFHLENBQUMsQ0FBQztBQUFDQyxPQUFBLENBQUFELFFBQUEsR0FBQUEsUUFBQTtBQUNwQkUsTUFBTSxDQUFDQyxNQUFNLENBQ1hILFFBQVEsRUFDUkksYUFBUSxFQUNSQyxnQkFBVSxFQUNWQyxxQkFFRixDQUFDO0FBQUMsSUFBQUMsUUFBQSxHQUdhUCxRQUFRO0FBQUFDLE9BQUEsQ0FBQU8sT0FBQSxHQUFBRCxRQUFBIn0=
|
|
12
|
+
Object.assign(commands, find_1.default, cookies_1.default, record_screen_1.default);
|
|
13
|
+
exports.default = commands;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":";;;;;;AAAA,kDAA8B;AAC9B,wDAAmC;AACnC,oEAAmD;AAEnD,MAAM,QAAQ,GAAG,EAAE,CAAC;AASX,4BAAQ;AARjB,MAAM,CAAC,MAAM,CACX,QAAQ,EACR,cAAQ,EACR,iBAAU,EACV,uBAAoB,CAErB,CAAC;AAGF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
export default commands;
|
|
2
|
+
export type StartRecordingOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* [hevc] - Specifies the codec type: "h264" or "hevc"
|
|
5
|
+
*/
|
|
6
|
+
codec: string;
|
|
7
|
+
/**
|
|
8
|
+
* [internal] - Supports "internal" or "external". Default is "internal"
|
|
9
|
+
*/
|
|
10
|
+
display: string;
|
|
11
|
+
/**
|
|
12
|
+
* - For non-rectangular displays, handle the mask by policy:
|
|
13
|
+
* - ignored: The mask is ignored and the unmasked framebuffer is saved.
|
|
14
|
+
* - alpha: Not supported, but retained for compatibility; the mask is rendered black.
|
|
15
|
+
* - black: The mask is rendered black.
|
|
16
|
+
*/
|
|
17
|
+
mask: string;
|
|
18
|
+
/**
|
|
19
|
+
* [600] - The maximum recording time, in seconds. The default
|
|
20
|
+
* value is 600 seconds (10 minutes).
|
|
21
|
+
*/
|
|
22
|
+
timeLimit: string | number;
|
|
23
|
+
/**
|
|
24
|
+
* [true] - Whether to ignore the call if a screen recording is currently running
|
|
25
|
+
* (`false`) or to start a new recording immediately and terminate the existing one if running (`true`).
|
|
26
|
+
*/
|
|
27
|
+
forceRestart: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type StopRecordingOptions = {
|
|
30
|
+
/**
|
|
31
|
+
* - The path to the remote location, where the resulting video should be uploaded.
|
|
32
|
+
* The following protocols are supported: http/https, ftp.
|
|
33
|
+
* Null or empty string value (the default setting) means the content of resulting
|
|
34
|
+
* file should be encoded as Base64 and passed as the endpoint response value.
|
|
35
|
+
* An exception will be thrown if the generated media file is too big to
|
|
36
|
+
* fit into the available process memory.
|
|
37
|
+
*/
|
|
38
|
+
remotePath: string;
|
|
39
|
+
/**
|
|
40
|
+
* - The name of the user for the remote authentication.
|
|
41
|
+
*/
|
|
42
|
+
user: string;
|
|
43
|
+
/**
|
|
44
|
+
* - The password for the remote authentication.
|
|
45
|
+
*/
|
|
46
|
+
pass: string;
|
|
47
|
+
/**
|
|
48
|
+
* - The http multipart upload method name. The 'PUT' one is used by default.
|
|
49
|
+
*/
|
|
50
|
+
method: string;
|
|
51
|
+
/**
|
|
52
|
+
* - Additional headers mapping for multipart http(s) uploads
|
|
53
|
+
*/
|
|
54
|
+
headers: any;
|
|
55
|
+
/**
|
|
56
|
+
* [file] - The name of the form field, where the file content BLOB should be stored for
|
|
57
|
+
* http(s) uploads
|
|
58
|
+
*/
|
|
59
|
+
fileFieldName: string;
|
|
60
|
+
/**
|
|
61
|
+
* - Additional form fields for multipart http(s) uploads
|
|
62
|
+
*/
|
|
63
|
+
formFields: any | [string, string][];
|
|
64
|
+
};
|
|
65
|
+
declare namespace commands {
|
|
66
|
+
/**
|
|
67
|
+
* @typedef {Object} StartRecordingOptions
|
|
68
|
+
*
|
|
69
|
+
* @property {string} codec [hevc] - Specifies the codec type: "h264" or "hevc"
|
|
70
|
+
* @property {string} display [internal] - Supports "internal" or "external". Default is "internal"
|
|
71
|
+
* @property {string} mask - For non-rectangular displays, handle the mask by policy:
|
|
72
|
+
* - ignored: The mask is ignored and the unmasked framebuffer is saved.
|
|
73
|
+
* - alpha: Not supported, but retained for compatibility; the mask is rendered black.
|
|
74
|
+
* - black: The mask is rendered black.
|
|
75
|
+
* @property {string|number} timeLimit [600] - The maximum recording time, in seconds. The default
|
|
76
|
+
* value is 600 seconds (10 minutes).
|
|
77
|
+
* @property {boolean} forceRestart [true] - Whether to ignore the call if a screen recording is currently running
|
|
78
|
+
* (`false`) or to start a new recording immediately and terminate the existing one if running (`true`).
|
|
79
|
+
*/
|
|
80
|
+
/**
|
|
81
|
+
* Record the Simulator's display in background while the automated test is running.
|
|
82
|
+
* This method uses `xcrun simctl io recordVideo` helper under the hood.
|
|
83
|
+
* Check the output of `xcrun simctl io` command for more details.
|
|
84
|
+
*
|
|
85
|
+
* @param {StartRecordingOptions} options - The available options.
|
|
86
|
+
* @this {import('../driver').SafariDriver}
|
|
87
|
+
* @throws {Error} If screen recording has failed to start or is not supported for the destination device.
|
|
88
|
+
*/
|
|
89
|
+
function startRecordingScreen(this: import("../driver").SafariDriver, options: StartRecordingOptions): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* @typedef {Object} StopRecordingOptions
|
|
92
|
+
*
|
|
93
|
+
* @property {string} remotePath - The path to the remote location, where the resulting video should be uploaded.
|
|
94
|
+
* The following protocols are supported: http/https, ftp.
|
|
95
|
+
* Null or empty string value (the default setting) means the content of resulting
|
|
96
|
+
* file should be encoded as Base64 and passed as the endpoint response value.
|
|
97
|
+
* An exception will be thrown if the generated media file is too big to
|
|
98
|
+
* fit into the available process memory.
|
|
99
|
+
* @property {string} user - The name of the user for the remote authentication.
|
|
100
|
+
* @property {string} pass - The password for the remote authentication.
|
|
101
|
+
* @property {string} method - The http multipart upload method name. The 'PUT' one is used by default.
|
|
102
|
+
* @property {Object} headers - Additional headers mapping for multipart http(s) uploads
|
|
103
|
+
* @property {string} fileFieldName [file] - The name of the form field, where the file content BLOB should be stored for
|
|
104
|
+
* http(s) uploads
|
|
105
|
+
* @property {Object|[string, string][]} formFields - Additional form fields for multipart http(s) uploads
|
|
106
|
+
*/
|
|
107
|
+
/**
|
|
108
|
+
* Stop recording the screen.
|
|
109
|
+
* If no screen recording has been started before then the method returns an empty string.
|
|
110
|
+
*
|
|
111
|
+
* @param {StopRecordingOptions} options - The available options.
|
|
112
|
+
* @returns {Promise<string>} Base64-encoded content of the recorded media file if 'remotePath'
|
|
113
|
+
* parameter is falsy or an empty string.
|
|
114
|
+
* @this {import('../driver').SafariDriver}
|
|
115
|
+
* @throws {Error} If there was an error while getting the name of a media file
|
|
116
|
+
* or the file content cannot be uploaded to the remote location
|
|
117
|
+
* or screen recording is not supported on the device under test.
|
|
118
|
+
*/
|
|
119
|
+
function stopRecordingScreen(this: import("../driver").SafariDriver, options: StopRecordingOptions): Promise<string>;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=record-screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-screen.d.ts","sourceRoot":"","sources":["../../../lib/commands/record-screen.js"],"names":[],"mappings":";;;;;WA8Mc,MAAM;;;;aACN,MAAM;;;;;;;UACN,MAAM;;;;;eAIN,MAAM,GAAC,MAAM;;;;;kBAEb,OAAO;;;;;;;;;;;gBA2DP,MAAM;;;;UAMN,MAAM;;;;UACN,MAAM;;;;YACN,MAAM;;;;;;;;;mBAEN,MAAM;;;;gBAEN,MAAO,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;;;IAlFvC;;;;;;;;;;;;;OAaG;IAEH;;;;;;;;OAQG;IACH,qHAyCC;IAED;;;;;;;;;;;;;;;;OAgBG;IAEH;;;;;;;;;;;OAWG;IACH,qHAiBC"}
|