webdriverio 7.16.9 → 7.16.13

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.
@@ -23,7 +23,7 @@ import { Browser as PuppeteerBrowser } from 'puppeteer-core/lib/cjs/puppeteer/co
23
23
  const puppeteerBrowser = await browser.getPuppeteer()
24
24
  // switch to Puppeteer
25
25
  const metrics = await browser.call(async () => {
26
- await pages = await puppeteerBrowser.pages()
26
+ const pages = await puppeteerBrowser.pages()
27
27
  pages[0].setGeolocation({ latitude: 59.95, longitude: 30.31667 })
28
28
  return pages[0].metrics()
29
29
  })
@@ -31,7 +31,7 @@ const log = (0, logger_1.default)('webdriverio');
31
31
  const puppeteerBrowser = await browser.getPuppeteer()
32
32
  // switch to Puppeteer
33
33
  const metrics = await browser.call(async () => {
34
- await pages = await puppeteerBrowser.pages()
34
+ const pages = await puppeteerBrowser.pages()
35
35
  pages[0].setGeolocation({ latitude: 59.95, longitude: 30.31667 })
36
36
  return pages[0].metrics()
37
37
  })
package/build/index.d.ts CHANGED
@@ -3,14 +3,39 @@ import SevereServiceErrorImport from './utils/SevereServiceError';
3
3
  import type { AttachOptions } from './types';
4
4
  export declare type RemoteOptions = Options.WebdriverIO & Omit<Options.Testrunner, 'capabilities'>;
5
5
  /**
6
- * A method to create a new session with WebdriverIO
6
+ * A method to create a new session with WebdriverIO.
7
+ *
8
+ * <b>
9
+ * NOTE: If you hit "error TS2694: Namespace 'global.WebdriverIO' has no exported member 'Browser'" when using typescript,
10
+ * add "webdriverio/async" into tsconfig.json's "types" array will solve it: <code> { "compilerOptions": { "types": ["webdriverio/async"] } } </code>
11
+ * </b>
7
12
  *
8
13
  * @param {Object} [params={}] Options to create the session with
9
14
  * @param {function} remoteModifier Modifier function to change the monad object
10
15
  * @return {object} browser object with sessionId
16
+ * @see <a href="https://webdriver.io/docs/typescript">Typescript setup</a>
11
17
  */
12
18
  export declare const remote: (params: RemoteOptions, remoteModifier?: Function | undefined) => Promise<WebdriverIO.Browser>;
13
19
  export declare const attach: (attachOptions: AttachOptions) => Promise<WebdriverIO.Browser>;
20
+ /**
21
+ * WebdriverIO allows you to run multiple automated sessions in a single test.
22
+ * This is handy when you’re testing features that require multiple users (for example, chat or WebRTC applications).
23
+ *
24
+ * Instead of creating a couple of remote instances where you need to execute common commands like newSession() or url() on each instance,
25
+ * you can simply create a multiremote instance and control all browsers at the same time.
26
+ *
27
+ * <b>
28
+ * NOTE: Multiremote is not meant to execute all your tests in parallel.
29
+ * It is intended to help coordinate multiple browsers and/or mobile devices for special integration tests (e.g. chat applications).
30
+ * </b>
31
+ *
32
+ * @param params capabilities to choose desired devices.
33
+ * @param automationProtocol
34
+ * @return All remote instances, the first result represents the capability defined first in the capability object,
35
+ * the second result the second capability and so on.
36
+ *
37
+ * @see <a href="https://webdriver.io/docs/multiremote">External document and example usage</a>.
38
+ */
14
39
  export declare const multiremote: (params: Capabilities.MultiRemoteCapabilities, { automationProtocol }?: {
15
40
  automationProtocol?: string | undefined;
16
41
  }) => Promise<WebdriverIO.MultiRemoteBrowser>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AAOjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,oBAAY,aAAa,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAA;AAE1F;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,WAA2B,aAAa,4CAA8B,QAAQ,YAAY,OAAO,CA+CnH,CAAA;AAED,eAAO,MAAM,MAAM,kBAAkC,aAAa,KAAG,QAAQ,YAAY,OAAO,CAmB/F,CAAA;AAED,eAAO,MAAM,WAAW,WACZ,aAAa,uBAAuB;;MAE7C,QAAQ,YAAY,kBAAkB,CAgExC,CAAA;AAED,eAAO,MAAM,kBAAkB,iCAA2B,CAAA;AAC1D,cAAc,SAAS,CAAA;AACvB,cAAc,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AAOjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,oBAAY,aAAa,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAA;AAE1F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,WAA2B,aAAa,4CAA8B,QAAQ,YAAY,OAAO,CA+CnH,CAAA;AAED,eAAO,MAAM,MAAM,kBAAkC,aAAa,KAAG,QAAQ,YAAY,OAAO,CAmB/F,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,WACZ,aAAa,uBAAuB;;MAE7C,QAAQ,YAAY,kBAAkB,CAgExC,CAAA;AAED,eAAO,MAAM,kBAAkB,iCAA2B,CAAA;AAC1D,cAAc,SAAS,CAAA;AACvB,cAAc,4BAA4B,CAAA"}
package/build/index.js CHANGED
@@ -37,11 +37,17 @@ const detectBackend_1 = __importDefault(require("./utils/detectBackend"));
37
37
  const constants_1 = require("./constants");
38
38
  const utils_2 = require("./utils");
39
39
  /**
40
- * A method to create a new session with WebdriverIO
40
+ * A method to create a new session with WebdriverIO.
41
+ *
42
+ * <b>
43
+ * NOTE: If you hit "error TS2694: Namespace 'global.WebdriverIO' has no exported member 'Browser'" when using typescript,
44
+ * add "webdriverio/async" into tsconfig.json's "types" array will solve it: <code> { "compilerOptions": { "types": ["webdriverio/async"] } } </code>
45
+ * </b>
41
46
  *
42
47
  * @param {Object} [params={}] Options to create the session with
43
48
  * @param {function} remoteModifier Modifier function to change the monad object
44
49
  * @return {object} browser object with sessionId
50
+ * @see <a href="https://webdriver.io/docs/typescript">Typescript setup</a>
45
51
  */
46
52
  const remote = async function (params, remoteModifier) {
47
53
  logger_1.default.setLogLevelsConfig(params.logLevels, params.logLevel);
@@ -100,6 +106,25 @@ const attach = async function (attachOptions) {
100
106
  return ProtocolDriver.attachToSession(params, undefined, prototype, utils_1.wrapCommand);
101
107
  };
102
108
  exports.attach = attach;
109
+ /**
110
+ * WebdriverIO allows you to run multiple automated sessions in a single test.
111
+ * This is handy when you’re testing features that require multiple users (for example, chat or WebRTC applications).
112
+ *
113
+ * Instead of creating a couple of remote instances where you need to execute common commands like newSession() or url() on each instance,
114
+ * you can simply create a multiremote instance and control all browsers at the same time.
115
+ *
116
+ * <b>
117
+ * NOTE: Multiremote is not meant to execute all your tests in parallel.
118
+ * It is intended to help coordinate multiple browsers and/or mobile devices for special integration tests (e.g. chat applications).
119
+ * </b>
120
+ *
121
+ * @param params capabilities to choose desired devices.
122
+ * @param automationProtocol
123
+ * @return All remote instances, the first result represents the capability defined first in the capability object,
124
+ * the second result the second capability and so on.
125
+ *
126
+ * @see <a href="https://webdriver.io/docs/multiremote">External document and example usage</a>.
127
+ */
103
128
  const multiremote = async function (params, { automationProtocol } = {}) {
104
129
  const multibrowser = new multiremote_1.default();
105
130
  const browserNames = Object.keys(params);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "webdriverio",
3
3
  "description": "Next-gen browser and mobile automation test framework for Node.js",
4
- "version": "7.16.9",
4
+ "version": "7.16.13",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <christian@saucelabs.com>",
7
7
  "license": "MIT",
@@ -56,19 +56,19 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@types/aria-query": "^5.0.0",
59
- "@types/node": "^16.11.1",
60
- "@wdio/config": "7.16.3",
59
+ "@types/node": "^17.0.4",
60
+ "@wdio/config": "7.16.13",
61
61
  "@wdio/logger": "7.16.0",
62
62
  "@wdio/protocols": "7.16.7",
63
- "@wdio/repl": "7.16.3",
64
- "@wdio/types": "7.16.3",
65
- "@wdio/utils": "7.16.3",
63
+ "@wdio/repl": "7.16.13",
64
+ "@wdio/types": "7.16.13",
65
+ "@wdio/utils": "7.16.13",
66
66
  "archiver": "^5.0.0",
67
67
  "aria-query": "^5.0.0",
68
68
  "css-shorthand-properties": "^1.1.1",
69
69
  "css-value": "^0.0.1",
70
- "devtools": "7.16.7",
71
- "devtools-protocol": "^0.0.943687",
70
+ "devtools": "7.16.13",
71
+ "devtools-protocol": "^0.0.953906",
72
72
  "fs-extra": "^10.0.0",
73
73
  "get-port": "^5.1.1",
74
74
  "grapheme-splitter": "^1.0.2",
@@ -77,12 +77,12 @@
77
77
  "lodash.isplainobject": "^4.0.6",
78
78
  "lodash.zip": "^4.2.0",
79
79
  "minimatch": "^3.0.4",
80
- "puppeteer-core": "^11.0.0",
80
+ "puppeteer-core": "^13.0.0",
81
81
  "query-selector-shadow-dom": "^1.0.0",
82
82
  "resq": "^1.9.1",
83
83
  "rgb2hex": "0.2.5",
84
84
  "serialize-error": "^8.0.0",
85
- "webdriver": "7.16.9"
85
+ "webdriver": "7.16.13"
86
86
  },
87
- "gitHead": "6bde2017b37bd3bf80feb3ebb0f9b7df89ce0c7f"
87
+ "gitHead": "a0079123fa5207523e8386e6e5100df0bf2f84ef"
88
88
  }