appium-safari-driver 3.3.4 → 3.5.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.
Files changed (61) hide show
  1. package/.eslintrc.json +15 -3
  2. package/.mocharc.js +1 -1
  3. package/CHANGELOG.md +19 -0
  4. package/README.md +2 -2
  5. package/build/index.d.ts +4 -0
  6. package/build/index.d.ts.map +1 -0
  7. package/build/index.js +9 -17
  8. package/build/index.js.map +1 -1
  9. package/build/lib/commands/cookies.d.ts +5 -0
  10. package/build/lib/commands/cookies.d.ts.map +1 -0
  11. package/build/lib/commands/cookies.js +5 -10
  12. package/build/lib/commands/cookies.js.map +1 -1
  13. package/build/lib/commands/find.d.ts +5 -0
  14. package/build/lib/commands/find.d.ts.map +1 -0
  15. package/build/lib/commands/find.js +12 -16
  16. package/build/lib/commands/find.js.map +1 -1
  17. package/build/lib/commands/index.d.ts +3 -0
  18. package/build/lib/commands/index.d.ts.map +1 -0
  19. package/build/lib/commands/index.js +11 -14
  20. package/build/lib/commands/index.js.map +1 -1
  21. package/build/lib/commands/record-screen.d.ts +121 -0
  22. package/build/lib/commands/record-screen.d.ts.map +1 -0
  23. package/build/lib/commands/record-screen.js +273 -230
  24. package/build/lib/commands/record-screen.js.map +1 -1
  25. package/build/lib/desired-caps.d.ts +39 -0
  26. package/build/lib/desired-caps.d.ts.map +1 -0
  27. package/build/lib/desired-caps.js +38 -39
  28. package/build/lib/desired-caps.js.map +1 -1
  29. package/build/lib/driver.d.ts +74 -0
  30. package/build/lib/driver.d.ts.map +1 -0
  31. package/build/lib/driver.js +80 -63
  32. package/build/lib/driver.js.map +1 -1
  33. package/build/lib/logger.d.ts +3 -0
  34. package/build/lib/logger.d.ts.map +1 -0
  35. package/build/lib/logger.js +5 -11
  36. package/build/lib/logger.js.map +1 -1
  37. package/build/lib/method-map.d.ts +19 -0
  38. package/build/lib/method-map.d.ts.map +1 -0
  39. package/build/lib/method-map.js +16 -25
  40. package/build/lib/method-map.js.map +1 -1
  41. package/build/lib/safari.d.ts +16 -0
  42. package/build/lib/safari.d.ts.map +1 -0
  43. package/build/lib/safari.js +148 -138
  44. package/build/lib/safari.js.map +1 -1
  45. package/build/lib/utils.d.ts +6 -0
  46. package/build/lib/utils.d.ts.map +1 -0
  47. package/build/lib/utils.js +23 -19
  48. package/build/lib/utils.js.map +1 -1
  49. package/build/tsconfig.tsbuildinfo +1 -0
  50. package/lib/commands/record-screen.js +29 -21
  51. package/lib/desired-caps.js +3 -0
  52. package/lib/driver.js +8 -2
  53. package/lib/safari.js +11 -6
  54. package/lib/utils.js +4 -0
  55. package/npm-shrinkwrap.json +526 -855
  56. package/package.json +29 -18
  57. package/test/functional/desktop-driver-e2e-specs.js +2 -2
  58. package/test/functional/mobile-driver-e2e-specs.js +2 -2
  59. package/test/unit/utils-specs.js +3 -1
  60. package/tsconfig.json +14 -0
  61. 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
@@ -1,4 +1,4 @@
1
1
  module.exports = {
2
- require: ['@babel/register'],
2
+ require: ['ts-node/register'],
3
3
  forbidOnly: Boolean(process.env.CI)
4
4
  };
package/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## [3.5.0](https://github.com/appium/appium-safari-driver/compare/v3.4.0...v3.5.0) (2023-08-18)
2
+
3
+
4
+ ### Features
5
+
6
+ * Switch babel to typescript ([#65](https://github.com/appium/appium-safari-driver/issues/65)) ([e49d833](https://github.com/appium/appium-safari-driver/commit/e49d833c5d3b7d7dd52a9e36f4ee602eb0952c49))
7
+
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * **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))
12
+
13
+ ## [3.4.0](https://github.com/appium/appium-safari-driver/compare/v3.3.4...v3.4.0) (2023-07-14)
14
+
15
+
16
+ ### Features
17
+
18
+ * add acceptInsecureCerts as safaridriver 15.4+ have it ([#63](https://github.com/appium/appium-safari-driver/issues/63)) ([0bf746a](https://github.com/appium/appium-safari-driver/commit/0bf746a3455c61313aeca0a75e9ee0877bc1661b))
19
+
1
20
  ## [3.3.4](https://github.com/appium/appium-safari-driver/compare/v3.3.3...v3.3.4) (2023-07-14)
2
21
 
3
22
 
package/README.md CHANGED
@@ -12,7 +12,7 @@ Under the hood this driver is a wrapper/proxy over Apple's `safaridriver` binary
12
12
 
13
13
  > **Note**
14
14
  >
15
- > Since version 3.0.0 Safari driver has dropped the support of Appium 1, and is only compatible to Appium 2. Use the `appium driver install safari`
15
+ > Since version 3.0.0 Safari driver has dropped the support of Appium 1, and is only compatible to Appium 2. Use the `appium driver install safari`
16
16
  > command to add it to your Appium 2 dist.
17
17
 
18
18
 
@@ -34,6 +34,7 @@ platformName | safaridriver binary can only create WebDriver sessions for deskto
34
34
  automationName | Value of automationName must equal to 'Safari' in order to start Safari driver session. Values of automationName are compared case-insensitively.
35
35
  browserName | safaridriver can only create WebDriver sessions for Safari. Any value passed to this capability will be changed to 'Safari'.
36
36
  browserVersion | safaridriver will only create a session using hosts whose Safari version matches the value of browserVersion. Browser version numbers are prefix-matched. For example, if the value of browserVersion is '12', this will allow hosts with a Safari version of '12.0.1' or '12.1'.
37
+ acceptInsecureCerts | Makes the browser to ignore the appropriate security warning and thus allows navigation to web sites having invalid or expired TLS certificates. The capability is supported since safaridriver v15.4.
37
38
  safari:platformVersion | safaridriver will only create a session using hosts whose OS version matches the value of safari:platformVersion. OS version numbers are prefix-matched. For example, if the value of safari:platformVersion is '12', this will allow hosts with an OS version of '12.0' or '12.1' but not '10.12'.
38
39
  safari:platformBuildVersion | safaridriver will only create a session using hosts whose OS build version matches the value of safari:platformBuildVersion. example of a macOS build version is '18E193'. On macOS, the OS build version can be determined by running the sw_vers(1) utility.
39
40
  safari:useSimulator | If the value of safari:useSimulator is true, safaridriver will only use iOS Simulator hosts. If the value of safari:useSimulator is false, safaridriver will not use iOS Simulator hosts. NOTE: An Xcode installation is required in order to run WebDriver tests on iOS Simulator hosts.
@@ -153,4 +154,3 @@ npm install
153
154
  npm run lint
154
155
  npm run test
155
156
  ```
156
-
@@ -0,0 +1,4 @@
1
+ export default SafariDriver;
2
+ export { SafariDriver };
3
+ import SafariDriver from './lib/driver';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "SafariDriver", {
8
- enumerable: true,
9
- get: function () {
10
- return _driver.default;
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_driver","_interopRequireDefault","require","_default","SafariDriver","exports","default"],"sources":["../index.js"],"sourcesContent":["import SafariDriver from './lib/driver';\n\nexport default SafariDriver;\nexport { SafariDriver };\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAwC,IAAAC,QAAA,GAEzBC,eAAY;AAAAC,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
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,5 @@
1
+ export default commands;
2
+ export namespace commands {
3
+ function deleteCookies(): Promise<any>;
4
+ }
5
+ //# sourceMappingURL=cookies.d.ts.map
@@ -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
- Object.defineProperty(exports, "__esModule", {
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
- return await this.safari.proxy.command('/cookie', 'DELETE');
7
+ return await this.safari.proxy.command('/cookie', 'DELETE');
12
8
  };
13
- var _default = commands;
14
- exports.default = _default;
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","names":["commands","exports","deleteCookies","safari","proxy","command","_default","default"],"sources":["../../../lib/commands/cookies.js"],"sourcesContent":["const commands = {};\n\ncommands.deleteCookies = async function deleteCookies () {\n return await this.safari.proxy.command('/cookie', 'DELETE');\n};\n\nexport { commands };\nexport default commands;\n"],"mappings":";;;;;;;AAAA,MAAMA,QAAQ,GAAG,CAAC,CAAC;AAACC,OAAA,CAAAD,QAAA,GAAAA,QAAA;AAEpBA,QAAQ,CAACE,aAAa,GAAG,eAAeA,aAAaA,CAAA,EAAI;EACvD,OAAO,MAAM,IAAI,CAACC,MAAM,CAACC,KAAK,CAACC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC;AAC7D,CAAC;AAAC,IAAAC,QAAA,GAGaN,QAAQ;AAAAC,OAAA,CAAAM,OAAA,GAAAD,QAAA"}
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,5 @@
1
+ export default commands;
2
+ export namespace commands {
3
+ function findElOrEls(strategy: any, selector: any, mult: any, context: any): Promise<any>;
4
+ }
5
+ //# sourceMappingURL=find.d.ts.map
@@ -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
- Object.defineProperty(exports, "__esModule", {
4
- value: true
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
- context = _support.util.unwrapElement(context);
13
- const endpoint = `/element${context ? `/${context}/element` : ''}${mult ? 's' : ''}`;
14
- return await this.safari.proxy.command(endpoint, 'POST', {
15
- using: strategy,
16
- value: selector
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
- var _default = commands;
20
- exports.default = _default;
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","names":["_support","require","commands","exports","findElOrEls","strategy","selector","mult","context","util","unwrapElement","endpoint","safari","proxy","command","using","value","_default","default"],"sources":["../../../lib/commands/find.js"],"sourcesContent":["import { util } from 'appium/support';\n\n\nconst commands = {};\n\n// This is needed to make lookup by image working\ncommands.findElOrEls = async function findElOrEls (strategy, selector, mult, context) {\n context = util.unwrapElement(context);\n const endpoint = `/element${context ? `/${context}/element` : ''}${mult ? 's' : ''}`;\n\n return await this.safari.proxy.command(endpoint, 'POST', {\n using: strategy,\n value: selector,\n });\n};\n\n\nexport { commands };\nexport default commands;\n"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAGA,MAAMC,QAAQ,GAAG,CAAC,CAAC;AAACC,OAAA,CAAAD,QAAA,GAAAA,QAAA;AAGpBA,QAAQ,CAACE,WAAW,GAAG,eAAeA,WAAWA,CAAEC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAE;EACpFA,OAAO,GAAGC,aAAI,CAACC,aAAa,CAACF,OAAO,CAAC;EACrC,MAAMG,QAAQ,GAAI,WAAUH,OAAO,GAAI,IAAGA,OAAQ,UAAS,GAAG,EAAG,GAAED,IAAI,GAAG,GAAG,GAAG,EAAG,EAAC;EAEpF,OAAO,MAAM,IAAI,CAACK,MAAM,CAACC,KAAK,CAACC,OAAO,CAACH,QAAQ,EAAE,MAAM,EAAE;IACvDI,KAAK,EAAEV,QAAQ;IACfW,KAAK,EAAEV;EACT,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAW,QAAA,GAIaf,QAAQ;AAAAC,OAAA,CAAAe,OAAA,GAAAD,QAAA"}
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,3 @@
1
+ export default commands;
2
+ export const commands: {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.commands = void 0;
8
- require("source-map-support/register");
9
- var _find = _interopRequireDefault(require("./find"));
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, _find.default, _cookies.default, _recordScreen.default);
15
- var _default = commands;
16
- exports.default = _default;
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","names":["_find","_interopRequireDefault","require","_cookies","_recordScreen","commands","exports","Object","assign","findCmds","cookieCmds","recordScreenCommands","_default","default"],"sources":["../../../lib/commands/index.js"],"sourcesContent":["import findCmds from './find';\nimport cookieCmds from './cookies';\nimport recordScreenCommands from './record-screen';\n\nconst commands = {};\nObject.assign(\n commands,\n findCmds,\n cookieCmds,\n recordScreenCommands,\n // add other command types here\n);\n\nexport { commands };\nexport default commands;\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,MAAMG,QAAQ,GAAG,CAAC,CAAC;AAACC,OAAA,CAAAD,QAAA,GAAAA,QAAA;AACpBE,MAAM,CAACC,MAAM,CACXH,QAAQ,EACRI,aAAQ,EACRC,gBAAU,EACVC,qBAEF,CAAC;AAAC,IAAAC,QAAA,GAGaP,QAAQ;AAAAC,OAAA,CAAAO,OAAA,GAAAD,QAAA"}
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"}