webdriverio 9.9.0 → 9.9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/url.ts"],"names":[],"mappings":"AAKA,KAAK,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,aAAa,GAAG,UAAU,CAAA;AAKpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmGG;AACH,wBAAsB,GAAG,CACrB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,iBAAsB,GAChC,OAAO,CAAC,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC,CA0GrC;AAED,UAAU,iBAAiB;IACvB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC;;;OAGG;IACH,IAAI,CAAC,EAAE;QACH,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACf,CAAA;IACD;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,OAAO,CAAA;CAC/B"}
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/url.ts"],"names":[],"mappings":"AAKA,KAAK,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,aAAa,GAAG,UAAU,CAAA;AAKpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmGG;AACH,wBAAsB,GAAG,CACrB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,iBAAsB,GAChC,OAAO,CAAC,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC,CA6HrC;AAED,UAAU,iBAAiB;IACvB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC;;;OAGG;IACH,IAAI,CAAC,EAAE;QACH,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACf,CAAA;IACD;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,OAAO,CAAA;CAC/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"waitForExist.d.ts","sourceRoot":"","sources":["../../../src/commands/element/waitForExist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,EACI,OAAqC,EACrC,QAAuC,EACvC,OAAe,EACf,UAAqG,EACxG,GAAE,cAAmB,iBAMzB"}
1
+ {"version":3,"file":"waitForExist.d.ts","sourceRoot":"","sources":["../../../src/commands/element/waitForExist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,YAAY,CAC9B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,EACI,OAAqC,EACrC,QAAuC,EACvC,OAAe,EACf,UAAqG,EACxG,GAAE,cAAmB,iBAmBzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAW,YAAY,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,KAAK,cAAc,MAAM,WAAW,CAAA;AAGhD,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AAOpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG/C,cAAc,YAAY,CAAA;AAC1B,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAc,CAAA;AAC9B,eAAO,MAAM,kBAAkB,iCAA2B,CAAA;AAE1D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,WACP,YAAY,CAAC,iBAAiB,mBACrB,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,iBAAiB,KAAK,cAAc,CAAC,MAAM,KACnH,OAAO,CAAC,WAAW,CAAC,OAAO,CA4C7B,CAAA;AAED,eAAO,MAAM,MAAM,kBAAkC,aAAa,KAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAwB/F,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,WACZ,YAAY,CAAC,gCAAgC,2BAC7B;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,KACxD,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAoExC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAW,YAAY,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,KAAK,cAAc,MAAM,WAAW,CAAA;AAGhD,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AAOpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG/C,cAAc,YAAY,CAAA;AAC1B,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAc,CAAA;AAC9B,eAAO,MAAM,kBAAkB,iCAA2B,CAAA;AAE1D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,WACP,YAAY,CAAC,iBAAiB,mBACrB,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,iBAAiB,KAAK,cAAc,CAAC,MAAM,KACnH,OAAO,CAAC,WAAW,CAAC,OAAO,CA4C7B,CAAA;AAED,eAAO,MAAM,MAAM,kBAAkC,aAAa,KAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CA8B/F,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,WACZ,YAAY,CAAC,gCAAgC,2BAC7B;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,KACxD,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAoExC,CAAA"}
package/build/index.js CHANGED
@@ -26,7 +26,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
26
26
  import logger27 from "@wdio/logger";
27
27
  import WebDriver, { DEFAULTS } from "webdriver";
28
28
  import { validateConfig } from "@wdio/config";
29
- import { enableFileLogging, wrapCommand as wrapCommand3 } from "@wdio/utils";
29
+ import { enableFileLogging, wrapCommand as wrapCommand3, isBidi } from "@wdio/utils";
30
30
 
31
31
  // src/multiremote.ts
32
32
  import zip from "lodash.zip";
@@ -5517,6 +5517,15 @@ async function url(path, options = {}) {
5517
5517
  context,
5518
5518
  url: path,
5519
5519
  wait
5520
+ }).catch((err) => {
5521
+ if (
5522
+ // Chrome error message
5523
+ err.message.includes("navigation canceled by concurrent navigation") || // Firefox error message
5524
+ err.message.includes("failed with error: unknown error")
5525
+ ) {
5526
+ return this.navigateTo(validateUrl(path));
5527
+ }
5528
+ throw err;
5520
5529
  });
5521
5530
  if (mock2) {
5522
5531
  await mock2.restore();
@@ -5534,6 +5543,9 @@ async function url(path, options = {}) {
5534
5543
  if (resetPreloadScript) {
5535
5544
  await resetPreloadScript.remove();
5536
5545
  }
5546
+ if (!navigation) {
5547
+ return;
5548
+ }
5537
5549
  const request = await this.waitUntil(
5538
5550
  () => network.getRequestResponseData(navigation.navigation),
5539
5551
  /**
@@ -7783,16 +7795,21 @@ async function waitForEnabled({
7783
7795
  }
7784
7796
 
7785
7797
  // src/commands/element/waitForExist.ts
7786
- function waitForExist({
7798
+ async function waitForExist({
7787
7799
  timeout = this.options.waitforTimeout,
7788
7800
  interval = this.options.waitforInterval,
7789
7801
  reverse = false,
7790
7802
  timeoutMsg = 'element ("'.concat(this.selector, '") still ').concat(reverse ? "" : "not ", "existing after ").concat(timeout, "ms")
7791
7803
  } = {}) {
7792
- return this.waitUntil(
7804
+ const isExisting2 = await this.waitUntil(
7793
7805
  async () => reverse !== await this.isExisting(),
7794
7806
  { timeout, interval, timeoutMsg }
7795
7807
  );
7808
+ if (!reverse && isExisting2 && typeof this.selector === "string") {
7809
+ this.elementId = await this.parent.$(this.selector).elementId;
7810
+ delete this.error;
7811
+ }
7812
+ return isExisting2;
7796
7813
  }
7797
7814
 
7798
7815
  // src/commands/element/waitForStable.ts
@@ -8920,6 +8937,9 @@ var attach = async function(attachOptions) {
8920
8937
  wrapCommand3
8921
8938
  );
8922
8939
  driver.addLocatorStrategy = addLocatorStrategyHandler(driver);
8940
+ if (isBidi(driver.capabilities) && "_bidiHandler" in driver) {
8941
+ await driver["_bidiHandler"].waitForConnected();
8942
+ }
8923
8943
  await registerSessionManager(driver);
8924
8944
  return driver;
8925
8945
  };
package/build/node.js CHANGED
@@ -496,7 +496,7 @@ async function saveElementScreenshot(filepath) {
496
496
  import logger28 from "@wdio/logger";
497
497
  import WebDriver, { DEFAULTS } from "webdriver";
498
498
  import { validateConfig } from "@wdio/config";
499
- import { enableFileLogging, wrapCommand as wrapCommand3 } from "@wdio/utils";
499
+ import { enableFileLogging, wrapCommand as wrapCommand3, isBidi } from "@wdio/utils";
500
500
 
501
501
  // src/multiremote.ts
502
502
  import zip from "lodash.zip";
@@ -5538,6 +5538,15 @@ async function url(path4, options = {}) {
5538
5538
  context,
5539
5539
  url: path4,
5540
5540
  wait
5541
+ }).catch((err) => {
5542
+ if (
5543
+ // Chrome error message
5544
+ err.message.includes("navigation canceled by concurrent navigation") || // Firefox error message
5545
+ err.message.includes("failed with error: unknown error")
5546
+ ) {
5547
+ return this.navigateTo(validateUrl(path4));
5548
+ }
5549
+ throw err;
5541
5550
  });
5542
5551
  if (mock2) {
5543
5552
  await mock2.restore();
@@ -5555,6 +5564,9 @@ async function url(path4, options = {}) {
5555
5564
  if (resetPreloadScript) {
5556
5565
  await resetPreloadScript.remove();
5557
5566
  }
5567
+ if (!navigation) {
5568
+ return;
5569
+ }
5558
5570
  const request = await this.waitUntil(
5559
5571
  () => network.getRequestResponseData(navigation.navigation),
5560
5572
  /**
@@ -7482,16 +7494,21 @@ async function waitForEnabled({
7482
7494
  }
7483
7495
 
7484
7496
  // src/commands/element/waitForExist.ts
7485
- function waitForExist({
7497
+ async function waitForExist({
7486
7498
  timeout = this.options.waitforTimeout,
7487
7499
  interval = this.options.waitforInterval,
7488
7500
  reverse = false,
7489
7501
  timeoutMsg = `element ("${this.selector}") still ${reverse ? "" : "not "}existing after ${timeout}ms`
7490
7502
  } = {}) {
7491
- return this.waitUntil(
7503
+ const isExisting2 = await this.waitUntil(
7492
7504
  async () => reverse !== await this.isExisting(),
7493
7505
  { timeout, interval, timeoutMsg }
7494
7506
  );
7507
+ if (!reverse && isExisting2 && typeof this.selector === "string") {
7508
+ this.elementId = await this.parent.$(this.selector).elementId;
7509
+ delete this.error;
7510
+ }
7511
+ return isExisting2;
7495
7512
  }
7496
7513
 
7497
7514
  // src/commands/element/waitForStable.ts
@@ -8601,6 +8618,9 @@ var attach = async function(attachOptions) {
8601
8618
  wrapCommand3
8602
8619
  );
8603
8620
  driver.addLocatorStrategy = addLocatorStrategyHandler(driver);
8621
+ if (isBidi(driver.capabilities) && "_bidiHandler" in driver) {
8622
+ await driver["_bidiHandler"].waitForConnected();
8623
+ }
8604
8624
  await registerSessionManager(driver);
8605
8625
  return driver;
8606
8626
  };
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.9.0",
4
+ "version": "9.9.1",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -99,7 +99,7 @@
99
99
  "rgb2hex": "0.2.5",
100
100
  "serialize-error": "^11.0.3",
101
101
  "urlpattern-polyfill": "^10.0.0",
102
- "webdriver": "9.9.0"
102
+ "webdriver": "9.9.1"
103
103
  },
104
104
  "peerDependencies": {
105
105
  "puppeteer-core": "^22.3.0"
@@ -109,5 +109,5 @@
109
109
  "optional": true
110
110
  }
111
111
  },
112
- "gitHead": "620e092391d7bcc71cd7cd55ad146ad72e522da9"
112
+ "gitHead": "a7f0c07b223c9a4a7774fead36ec82296a99177f"
113
113
  }