webdriverio 9.1.3 → 9.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -3014,7 +3014,7 @@ var ContextManager = class {
3014
3014
  */
3015
3015
  async #handleNavigationStarted(context) {
3016
3016
  const windowHandle = await this.#browser.getWindowHandle();
3017
- if (context.context === windowHandle) {
3017
+ if (context.context === windowHandle && context.url !== "UNKNOWN") {
3018
3018
  log4.info(`Update current context: ${context.context}`);
3019
3019
  this.#currentContext = context.context;
3020
3020
  }
@@ -3034,7 +3034,7 @@ var ContextManager = class {
3034
3034
  import logger5 from "@wdio/logger";
3035
3035
  var polyfillManager = /* @__PURE__ */ new Map();
3036
3036
  var log5 = logger5("webdriverio:PolyfillManager");
3037
- var NAME_POLYFILL = "var __defProp = Object.defineProperty;var __name = (target, value) => __defProp(target, 'name', { value, configurable: true });globalThis.__name = __name;";
3037
+ var NAME_POLYFILL = "var __defProp = Object.defineProperty;var __name = function (target, value) { return __defProp(target, 'name', { value: value, configurable: true }); };var __globalThis = (typeof globalThis === 'object' && globalThis) || (typeof window === 'object' && window);__globalThis.__name = __name;";
3038
3038
  function getPolyfillManager(browser) {
3039
3039
  const existingPolyfillManager = polyfillManager.get(browser);
3040
3040
  if (existingPolyfillManager) {
@@ -4955,7 +4955,7 @@ var ShadowRootManager = class {
4955
4955
  }).then(() => true, () => false);
4956
4956
  this.#browser.on("log.entryAdded", this.handleLogEntry.bind(this));
4957
4957
  this.#browser.on("result", this.#commandResultHandler.bind(this));
4958
- this.#browser.on("browsingContext.navigationStarted", this.#handleNavigationStarted.bind(this));
4958
+ this.#browser.on("bidiCommand", this.#handleBidiCommand.bind(this));
4959
4959
  browser.scriptAddPreloadScript({
4960
4960
  functionDeclaration: customElementWrapper.toString()
4961
4961
  });
@@ -4966,8 +4966,12 @@ var ShadowRootManager = class {
4966
4966
  /**
4967
4967
  * keep track of navigation events and remove shadow roots when they are no longer needed
4968
4968
  */
4969
- #handleNavigationStarted(context) {
4970
- this.#shadowRoots.delete(context.context);
4969
+ #handleBidiCommand(command) {
4970
+ if (command.method !== "browsingContext.navigate") {
4971
+ return;
4972
+ }
4973
+ const params = command.params;
4974
+ this.#shadowRoots.delete(params.context);
4971
4975
  }
4972
4976
  /**
4973
4977
  * keep track of frame depth
@@ -1 +1 @@
1
- {"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../src/polyfill.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,QAIzB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,mBAS9D;AAED;;GAEG;AACH,qBAAa,eAAe;;gBAGZ,OAAO,EAAE,WAAW,CAAC,OAAO;IAkClC,UAAU;CAGnB"}
1
+ {"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../src/polyfill.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,QAKzB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,mBAS9D;AAED;;GAEG;AACH,qBAAa,eAAe;;gBAGZ,OAAO,EAAE,WAAW,CAAC,OAAO;IAkClC,UAAU;CAGnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"shadowRoot.d.ts","sourceRoot":"","sources":["../src/shadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,WAAW,CAAA;AAQtC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,qBAShE;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;;gBAMd,OAAO,EAAE,WAAW,CAAC,OAAO;IAyBlC,UAAU;IAuBhB;;;OAGG;IACH,aAAa;IAIb;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ;IA2FvC,4BAA4B,CAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG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aAAa;IAIb;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ;IA2FvC,4BAA4B,CAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE;IAwB1E,gCAAgC,CAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE;IAgBpG,qBAAqB,CAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IActF,gBAAgB,CAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAOvD;AAED,qBAAa,cAAc;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,QAAQ,sBAA4B;gBAEvB,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc;IAMxE;;OAEG;IACH,gBAAgB,CAAE,IAAI,EAAE,cAAc,GAAG,IAAI;IAC7C;;;;;OAKG;IACH,gBAAgB,CAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI;IA6B5D,IAAI,CAAE,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAelD,cAAc,CAAE,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAe/D,kBAAkB,IAAK,MAAM,EAAE;IAO/B,IAAI,IAAK,cAAc,EAAE;IAIzB,MAAM,CAAE,OAAO,EAAE,MAAM,GAAG,OAAO;CAcpC"}
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": "9.1.3",
4
+ "version": "9.1.5",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -100,7 +100,7 @@
100
100
  "rgb2hex": "0.2.5",
101
101
  "serialize-error": "^11.0.3",
102
102
  "urlpattern-polyfill": "^10.0.0",
103
- "webdriver": "9.1.3"
103
+ "webdriver": "9.1.5"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "puppeteer-core": "^22.3.0"
@@ -110,5 +110,5 @@
110
110
  "optional": true
111
111
  }
112
112
  },
113
- "gitHead": "db677c6008e388301aba23f655679f4c5b6ea023"
113
+ "gitHead": "1c712c15d861b68ce516aa77dcf0ec0228ac3a94"
114
114
  }