webdriverio 9.2.4 → 9.2.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,kBAS7D;AAED;;;;GAIG;AACH,qBAAa,cAAc;;gBAIX,OAAO,EAAE,WAAW,CAAC,OAAO;IAiCxC;;OAEG;IACG,UAAU;IAahB,iBAAiB,CAAE,OAAO,EAAE,MAAM;IAI5B,iBAAiB;CAM1B"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,kBAS7D;AAED;;;;GAIG;AACH,qBAAa,cAAc;;gBAIX,OAAO,EAAE,WAAW,CAAC,OAAO;IAoCxC;;OAEG;IACG,UAAU;IAUhB,iBAAiB,CAAE,OAAO,EAAE,MAAM;IAI5B,iBAAiB;CAM1B"}
package/build/index.js CHANGED
@@ -2989,7 +2989,7 @@ var ContextManager = class {
2989
2989
  #currentContext;
2990
2990
  constructor(browser) {
2991
2991
  this.#browser = browser;
2992
- if (process.env.WDIO_UNIT_TESTS) {
2992
+ if (!this.#isEnabled()) {
2993
2993
  return;
2994
2994
  }
2995
2995
  this.#browser.on("command", (event) => {
@@ -3001,12 +3001,18 @@ var ContextManager = class {
3001
3001
  }
3002
3002
  });
3003
3003
  }
3004
+ /**
3005
+ * Only run this session helper if BiDi is enabled and we're not in unit tests.
3006
+ */
3007
+ #isEnabled() {
3008
+ return !process.env.WDIO_UNIT_TESTS && this.#browser.isBidi;
3009
+ }
3004
3010
  /**
3005
3011
  * set context at the start of the session
3006
3012
  */
3007
3013
  async initialize() {
3008
- if (process.env.WDIO_UNIT_TESTS) {
3009
- return "fake-context";
3014
+ if (!this.#isEnabled()) {
3015
+ return "";
3010
3016
  }
3011
3017
  const windowHandle = await this.#browser.getWindowHandle();
3012
3018
  this.#currentContext = windowHandle;
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.2.4",
4
+ "version": "9.2.6",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -76,12 +76,12 @@
76
76
  "dependencies": {
77
77
  "@types/node": "^20.11.30",
78
78
  "@types/sinonjs__fake-timers": "^8.1.5",
79
- "@wdio/config": "9.2.2",
79
+ "@wdio/config": "9.2.5",
80
80
  "@wdio/logger": "9.1.3",
81
81
  "@wdio/protocols": "9.2.2",
82
82
  "@wdio/repl": "9.0.8",
83
83
  "@wdio/types": "9.2.2",
84
- "@wdio/utils": "9.2.2",
84
+ "@wdio/utils": "9.2.5",
85
85
  "archiver": "^7.0.1",
86
86
  "aria-query": "^5.3.0",
87
87
  "cheerio": "^1.0.0-rc.12",
@@ -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.2.2"
103
+ "webdriver": "9.2.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": "9e40f2368a612cd7882f06a55afdc52ead201ec3"
113
+ "gitHead": "2bbc5c904c711f88777b4d9f5daaa33b6ddb4c2e"
114
114
  }