expect-webdriverio 6.1.0 → 8.0.0-alpha.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 (56) hide show
  1. package/README.md +22 -7
  2. package/jasmine-wdio-expect-async.d.ts +1 -1
  3. package/jest.d.ts +4 -2
  4. package/lib/api/index.js +2 -0
  5. package/lib/constants.js +0 -6
  6. package/lib/index.js +3 -13
  7. package/lib/jasmineUtils.js +2 -2
  8. package/lib/matchers/asymmetrics/asymmetricsUtils.js +10 -0
  9. package/lib/matchers/asymmetrics/multiRemote.js +36 -0
  10. package/lib/matchers/asymmetrics/oneOf.js +2 -2
  11. package/lib/matchers/browser/toHaveClipboardText.js +24 -10
  12. package/lib/matchers/browser/toHaveLocalStorageItem.js +23 -22
  13. package/lib/matchers/browser/toHaveTitle.js +16 -6
  14. package/lib/matchers/browser/toHaveUrl.js +16 -6
  15. package/lib/matchers/element/toBeClickable.js +3 -2
  16. package/lib/matchers/element/toBeDisabled.js +3 -2
  17. package/lib/matchers/element/toBeDisplayed.js +3 -2
  18. package/lib/matchers/element/toBeDisplayedInViewport.js +3 -2
  19. package/lib/matchers/element/toBeEnabled.js +3 -2
  20. package/lib/matchers/element/toBeExisting.js +5 -2
  21. package/lib/matchers/element/toBeFocused.js +3 -2
  22. package/lib/matchers/element/toBeSelected.js +4 -4
  23. package/lib/matchers/element/toHaveAttribute.js +4 -16
  24. package/lib/matchers/element/toHaveChildren.js +9 -14
  25. package/lib/matchers/element/toHaveComputedLabel.js +4 -6
  26. package/lib/matchers/element/toHaveComputedRole.js +4 -6
  27. package/lib/matchers/element/toHaveElementClass.js +5 -10
  28. package/lib/matchers/element/toHaveElementProperty.js +4 -9
  29. package/lib/matchers/element/toHaveHTML.js +6 -8
  30. package/lib/matchers/element/toHaveHeight.js +6 -7
  31. package/lib/matchers/element/toHaveHref.js +6 -3
  32. package/lib/matchers/element/toHaveId.js +3 -2
  33. package/lib/matchers/element/toHaveSize.js +3 -4
  34. package/lib/matchers/element/toHaveStyle.js +3 -4
  35. package/lib/matchers/element/toHaveText.js +5 -8
  36. package/lib/matchers/element/toHaveValue.js +1 -1
  37. package/lib/matchers/element/toHaveWidth.js +6 -7
  38. package/lib/matchers/elements/toBeElementsArrayOfSize.js +71 -6
  39. package/lib/matchers/mock/toBeRequested.js +1 -1
  40. package/lib/matchers/mock/toBeRequestedTimes.js +30 -7
  41. package/lib/matchers/mock/toBeRequestedWith.js +40 -15
  42. package/lib/matchers/snapshot.js +38 -7
  43. package/lib/matchers.js +32 -32
  44. package/lib/snapshot.js +1 -8
  45. package/lib/tsconfig.build.tsbuildinfo +1 -1
  46. package/lib/util/elementsUtil.js +35 -6
  47. package/lib/util/executeBrowserCommand.js +37 -0
  48. package/lib/util/executeCommand.js +101 -52
  49. package/lib/util/formatMessage.js +81 -7
  50. package/lib/util/multiRemoteUtils.js +93 -0
  51. package/lib/util/numberOptionsUtil.js +19 -24
  52. package/lib/util/refetchElements.js +24 -2
  53. package/lib/utils.js +16 -111
  54. package/package.json +37 -40
  55. package/types/expect-global.d.ts +1 -2
  56. package/types/expect-webdriverio.d.ts +386 -232
@@ -1,6 +1,8 @@
1
1
  import { waitUntil, enhanceError } from '../../utils.js';
2
2
  import { DEFAULT_OPTIONS } from '../../constants.js';
3
- import { validateNumberAndExtractOptions } from '../../util/numberOptionsUtil.js';
3
+ import { validateNumberMatcher } from '../../util/numberOptionsUtil.js';
4
+ import { awaitMocks, getMockInstanceNames, isMockArray } from '../../util/multiRemoteUtils.js';
5
+ import { formatMultiRemoteMocks, labelMultiRemoteValues } from '../../util/formatMessage.js';
4
6
  export async function toBeRequestedTimes(received, expectedValue, options = DEFAULT_OPTIONS) {
5
7
  const { verb = 'be', isNot, matcherName = 'toBeRequestedTimes', expectation = `called${typeof expectedValue === 'number' ? ' ' + expectedValue : ''} time${expectedValue !== 1 ? 's' : ''}`, } = this;
6
8
  await options.beforeAssertion?.({
@@ -8,12 +10,33 @@ export async function toBeRequestedTimes(received, expectedValue, options = DEFA
8
10
  expectedValue,
9
11
  options,
10
12
  });
11
- const { numberMatcher: expectedNumber, commandOptions } = validateNumberAndExtractOptions(expectedValue, options);
12
- const { success: pass, actual } = await waitUntil(async () => {
13
- const actual = received.calls.length;
14
- return { success: expectedNumber.asymmetricMatch(actual), subject: received, actual };
15
- }, isNot, { wait: commandOptions.wait, interval: commandOptions.interval });
16
- const message = enhanceError('mock', expectedNumber, actual, this, verb, expectation, '', commandOptions);
13
+ const expectedNumber = validateNumberMatcher(expectedValue);
14
+ const mocks = await awaitMocks(received);
15
+ let message;
16
+ let pass;
17
+ if (isMockArray(mocks)) {
18
+ const instanceNames = getMockInstanceNames(mocks);
19
+ const { names } = instanceNames;
20
+ const label = (value) => instanceNames.isNamedByInstance ? labelMultiRemoteValues(value) : value;
21
+ const result = await waitUntil(async () => {
22
+ const actual = Object.fromEntries(mocks.map((mock, index) => [names[index], mock.calls.length]));
23
+ const matches = (name) => expectedNumber.asymmetricMatch(actual[name]);
24
+ const success = isNot ? names.some(matches) : names.every(matches);
25
+ return { success, subject: mocks, actual };
26
+ }, isNot, { wait: options.wait, interval: options.interval });
27
+ pass = result.success;
28
+ const expected = Object.fromEntries(names.map((name) => [name, expectedNumber]));
29
+ message = enhanceError(formatMultiRemoteMocks(instanceNames), label(expected), label(result.actual), this, verb, expectation, '', options);
30
+ }
31
+ else {
32
+ const mock = mocks;
33
+ const result = await waitUntil(async () => {
34
+ const actual = mock.calls.length;
35
+ return { success: expectedNumber.asymmetricMatch(actual), subject: mock, actual };
36
+ }, isNot, { wait: options.wait, interval: options.interval });
37
+ pass = result.success;
38
+ message = enhanceError('mock', expectedNumber, result.actual, this, verb, expectation, '', options);
39
+ }
17
40
  const result = {
18
41
  pass,
19
42
  message: () => message
@@ -1,6 +1,8 @@
1
1
  import { waitUntil, enhanceError, isAsymmetricMatcher, getAsymmetricMatcherValue } from '../../utils.js';
2
2
  import { equals } from '../../jasmineUtils.js';
3
3
  import { DEFAULT_OPTIONS } from '../../constants.js';
4
+ import { awaitMocks, getMockInstanceNames, isMockArray } from '../../util/multiRemoteUtils.js';
5
+ import { formatMultiRemoteMocks, labelMultiRemoteValues } from '../../util/formatMessage.js';
4
6
  const STR_LIMIT = 80;
5
7
  const KEY_LIMIT = 12;
6
8
  function reduceHeaders(headers) {
@@ -16,9 +18,42 @@ export async function toBeRequestedWith(received, expectedValue = {}, options =
16
18
  expectedValue,
17
19
  options,
18
20
  });
21
+ const parseCache = new Map();
22
+ const mocks = await awaitMocks(received);
23
+ let pass;
24
+ let message;
25
+ if (isMockArray(mocks)) {
26
+ const instanceNames = getMockInstanceNames(mocks);
27
+ const { names } = instanceNames;
28
+ const label = (value) => instanceNames.isNamedByInstance ? labelMultiRemoteValues(value) : value;
29
+ const results = await Promise.all(mocks.map((mock) => checkRequestedWith(mock, expectedValue, options, !!isNot, parseCache)));
30
+ pass = isNot ? results.some((result) => result.pass) : results.every((result) => result.pass);
31
+ const expected = Object.fromEntries(names.map((name) => [name, minifyRequestedWith(expectedValue)]));
32
+ const actual = Object.fromEntries(results.map((result, index) => [names[index], result.actual]));
33
+ const payloadNeverCollected = results.some((result) => !result.pass && result.payloadNeverCollected);
34
+ message = enhanceError(formatMultiRemoteMocks(instanceNames), label(expected), label(actual), this, verb, expectation, '', options)
35
+ + (!pass && !isNot && payloadNeverCollected ? payloadCollectionHint(expectedValue) : '');
36
+ }
37
+ else {
38
+ const result = await checkRequestedWith(mocks, expectedValue, options, !!isNot, parseCache);
39
+ pass = result.pass;
40
+ message = enhanceError('mock', minifyRequestedWith(expectedValue), result.actual, this, verb, expectation, '', options) + (!pass && !isNot && result.payloadNeverCollected ? payloadCollectionHint(expectedValue) : '');
41
+ }
42
+ const result = {
43
+ pass,
44
+ message: () => message
45
+ };
46
+ await options.afterAssertion?.({
47
+ matcherName,
48
+ expectedValue,
49
+ options,
50
+ result
51
+ });
52
+ return result;
53
+ }
54
+ const checkRequestedWith = async (received, expectedValue, options, isNot, parseCache) => {
19
55
  const hasPayloadExpectation = expectedValue.postData !== undefined || expectedValue.response !== undefined;
20
56
  const waitForPayloadOnNot = isNot && hasPayloadExpectation;
21
- const parseCache = new Map();
22
57
  let payloadNeverCollected = false;
23
58
  const { success: pass, actual } = await waitUntil(async () => {
24
59
  let lastCall;
@@ -50,19 +85,12 @@ export async function toBeRequestedWith(received, expectedValue = {}, options =
50
85
  abort: waitForPayloadOnNot && !hasPendingPayloadCandidate,
51
86
  };
52
87
  }, waitForPayloadOnNot ? false : isNot, { ...options, wait: (isNot && !waitForPayloadOnNot) ? 0 : options.wait });
53
- const message = enhanceError('mock', minifyRequestedWith(expectedValue), minifyRequestMock(actual, expectedValue, parseCache) || 'was not called', this, verb, expectation, '', options) + (!pass && !isNot && payloadNeverCollected ? payloadCollectionHint(expectedValue) : '');
54
- const result = {
88
+ return {
55
89
  pass,
56
- message: () => message
90
+ actual: minifyRequestMock(actual, expectedValue, parseCache) || 'was not called',
91
+ payloadNeverCollected,
57
92
  };
58
- await options.afterAssertion?.({
59
- matcherName,
60
- expectedValue,
61
- options,
62
- result
63
- });
64
- return result;
65
- }
93
+ };
66
94
  const payloadCollectionHint = (expectedValue) => {
67
95
  const fields = [
68
96
  expectedValue.postData !== undefined ? 'postData' : undefined,
@@ -266,6 +294,3 @@ const deleteUndefinedValues = (obj, baseline = obj) => {
266
294
  }
267
295
  });
268
296
  };
269
- export function toBeRequestedWithResponse(...args) {
270
- return toBeRequestedWith.call(this, ...args);
271
- }
@@ -2,6 +2,8 @@ import path from 'node:path';
2
2
  import { expect } from 'expect';
3
3
  import { stripSnapshotIndentation } from '@vitest/snapshot';
4
4
  import { SnapshotService } from '../snapshot.js';
5
+ import { awaitElementOrArray, isElementOrArrayOrMultiRemoteElementLike, isMultiRemoteElement, isMultiRemoteElementArray, isMultiRemoteElementsLike, isStrictlyElementArray } from '../util/elementsUtil.js';
6
+ import { getElementsPerInstance } from '../util/multiRemoteUtils.js';
5
7
  function returnSnapshotError(snapshotError) {
6
8
  try {
7
9
  expect(snapshotError.actual).toBe(snapshotError.expected);
@@ -38,12 +40,41 @@ function toMatchSnapshotAssert(received, message, inlineOptions) {
38
40
  return returnSnapshotError(e);
39
41
  }
40
42
  }
43
+ const isElementsToSnapshot = (received) => {
44
+ const isEmptyPlainArray = Array.isArray(received) && received.length === 0 && !isStrictlyElementArray(received) && !isMultiRemoteElementArray(received);
45
+ return isElementOrArrayOrMultiRemoteElementLike(received) && !isEmptyPlainArray;
46
+ };
47
+ const getOuterHTML = (element) => element.getHTML({ includeSelectorTag: true });
48
+ const getMultiRemoteOuterHTML = async (multiRemoteElements) => {
49
+ const isSingleElement = isMultiRemoteElement(multiRemoteElements);
50
+ if (!isSingleElement && multiRemoteElements.length === 0) {
51
+ return [];
52
+ }
53
+ const instances = [...(isSingleElement ? multiRemoteElements : multiRemoteElements[0]).instances].sort();
54
+ const elementsPerInstance = isSingleElement ? undefined : getElementsPerInstance(multiRemoteElements, instances);
55
+ const htmlPerInstance = Object.fromEntries(await Promise.all(instances.map(async (instance) => [
56
+ instance,
57
+ elementsPerInstance
58
+ ? await Promise.all(elementsPerInstance[instance].map(getOuterHTML))
59
+ : await getOuterHTML(multiRemoteElements.getInstance(instance))
60
+ ])));
61
+ const htmls = Object.values(htmlPerInstance);
62
+ return htmls.every((html) => JSON.stringify(html) === JSON.stringify(htmls[0])) ? htmls[0] : htmlPerInstance;
63
+ };
41
64
  async function toMatchSnapshotAsync(asyncReceived, message, inlineOptions) {
42
- let received = await asyncReceived;
43
- if (received && typeof received === 'object' && 'elementId' in received) {
44
- received = await received.getHTML({
45
- includeSelectorTag: true
46
- });
65
+ const { element, elements, multiRemoteSelector, other } = await awaitElementOrArray(await asyncReceived);
66
+ let received = other;
67
+ if (multiRemoteSelector) {
68
+ received = await getMultiRemoteOuterHTML(multiRemoteSelector);
69
+ }
70
+ else if (elements && isMultiRemoteElementsLike(elements)) {
71
+ received = await getMultiRemoteOuterHTML(elements);
72
+ }
73
+ else if (elements) {
74
+ received = await Promise.all(Array.from(elements).map(getOuterHTML));
75
+ }
76
+ else if (element) {
77
+ received = await getOuterHTML(element);
47
78
  }
48
79
  return toMatchSnapshotAssert(received, message, inlineOptions);
49
80
  }
@@ -53,8 +84,8 @@ function toMatchSnapshotHelper(received, message, inlineOptions) {
53
84
  throw new Error('Snapshot service is not initialized');
54
85
  }
55
86
  if (received && typeof received === 'object' &&
56
- ('elementId' in received ||
57
- 'then' in received)) {
87
+ ('then' in received ||
88
+ isElementsToSnapshot(received))) {
58
89
  return toMatchSnapshotAsync(received, message, inlineOptions);
59
90
  }
60
91
  return toMatchSnapshotAssert(received, message, inlineOptions);
package/lib/matchers.js CHANGED
@@ -1,32 +1,32 @@
1
- export * from './matchers/browser/toHaveClipboardText.js';
2
- export * from './matchers/browser/toHaveLocalStorageItem.js';
3
- export * from './matchers/browser/toHaveTitle.js';
4
- export * from './matchers/browser/toHaveUrl.js';
5
- export * from './matchers/element/toBeClickable.js';
6
- export * from './matchers/element/toBeDisabled.js';
7
- export * from './matchers/element/toBeDisplayed.js';
8
- export * from './matchers/element/toBeDisplayedInViewport.js';
9
- export * from './matchers/element/toBeEnabled.js';
10
- export * from './matchers/element/toBeExisting.js';
11
- export * from './matchers/element/toBeFocused.js';
12
- export * from './matchers/element/toBeSelected.js';
13
- export * from './matchers/element/toHaveAttribute.js';
14
- export * from './matchers/element/toHaveChildren.js';
15
- export * from './matchers/element/toHaveComputedLabel.js';
16
- export * from './matchers/element/toHaveComputedRole.js';
17
- export * from './matchers/element/toHaveElementClass.js';
18
- export * from './matchers/element/toHaveElementProperty.js';
19
- export * from './matchers/element/toHaveHeight.js';
20
- export * from './matchers/element/toHaveHref.js';
21
- export * from './matchers/element/toHaveHTML.js';
22
- export * from './matchers/element/toHaveId.js';
23
- export * from './matchers/element/toHaveSize.js';
24
- export * from './matchers/element/toHaveStyle.js';
25
- export * from './matchers/element/toHaveText.js';
26
- export * from './matchers/element/toHaveValue.js';
27
- export * from './matchers/element/toHaveWidth.js';
28
- export * from './matchers/elements/toBeElementsArrayOfSize.js';
29
- export * from './matchers/mock/toBeRequested.js';
30
- export * from './matchers/mock/toBeRequestedTimes.js';
31
- export * from './matchers/mock/toBeRequestedWith.js';
32
- export * from './matchers/snapshot.js';
1
+ export { toHaveClipboardText } from './matchers/browser/toHaveClipboardText.js';
2
+ export { toHaveLocalStorageItem } from './matchers/browser/toHaveLocalStorageItem.js';
3
+ export { toHaveTitle } from './matchers/browser/toHaveTitle.js';
4
+ export { toHaveUrl } from './matchers/browser/toHaveUrl.js';
5
+ export { toBeClickable } from './matchers/element/toBeClickable.js';
6
+ export { toBeDisabled } from './matchers/element/toBeDisabled.js';
7
+ export { toBeDisplayed } from './matchers/element/toBeDisplayed.js';
8
+ export { toBeDisplayedInViewport } from './matchers/element/toBeDisplayedInViewport.js';
9
+ export { toBeEnabled } from './matchers/element/toBeEnabled.js';
10
+ export { toExist, toBeExisting, toBePresent } from './matchers/element/toBeExisting.js';
11
+ export { toBeFocused } from './matchers/element/toBeFocused.js';
12
+ export { toBeSelected, toBeChecked } from './matchers/element/toBeSelected.js';
13
+ export { toHaveAttribute } from './matchers/element/toHaveAttribute.js';
14
+ export { toHaveChildren } from './matchers/element/toHaveChildren.js';
15
+ export { toHaveComputedLabel } from './matchers/element/toHaveComputedLabel.js';
16
+ export { toHaveComputedRole } from './matchers/element/toHaveComputedRole.js';
17
+ export { toHaveElementClass } from './matchers/element/toHaveElementClass.js';
18
+ export { toHaveElementProperty } from './matchers/element/toHaveElementProperty.js';
19
+ export { toHaveHeight } from './matchers/element/toHaveHeight.js';
20
+ export { toHaveHref, toHaveLink } from './matchers/element/toHaveHref.js';
21
+ export { toHaveHTML } from './matchers/element/toHaveHTML.js';
22
+ export { toHaveId } from './matchers/element/toHaveId.js';
23
+ export { toHaveSize } from './matchers/element/toHaveSize.js';
24
+ export { toHaveStyle } from './matchers/element/toHaveStyle.js';
25
+ export { toHaveText } from './matchers/element/toHaveText.js';
26
+ export { toHaveValue } from './matchers/element/toHaveValue.js';
27
+ export { toHaveWidth } from './matchers/element/toHaveWidth.js';
28
+ export { toBeElementsArrayOfSize } from './matchers/elements/toBeElementsArrayOfSize.js';
29
+ export { toBeRequested } from './matchers/mock/toBeRequested.js';
30
+ export { toBeRequestedTimes } from './matchers/mock/toBeRequestedTimes.js';
31
+ export { toBeRequestedWith } from './matchers/mock/toBeRequestedWith.js';
32
+ export { toMatchSnapshot, toMatchInlineSnapshot } from './matchers/snapshot.js';
package/lib/snapshot.js CHANGED
@@ -1,4 +1,3 @@
1
- import { expect } from '@wdio/globals';
2
1
  import { SnapshotClient } from '@vitest/snapshot';
3
2
  import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment';
4
3
  import { getGlobalSingleton } from './util/globalSingleton.js';
@@ -75,13 +74,7 @@ export class SnapshotService {
75
74
  this.#snapshotResults.push(result);
76
75
  }
77
76
  #isEqual(received, expected) {
78
- try {
79
- expect(received).toBe(expected);
80
- return true;
81
- }
82
- catch {
83
- return false;
84
- }
77
+ return Object.is(received, expected);
85
78
  }
86
79
  static initiate(options) {
87
80
  return getGlobalSingleton('snapshotService', () => new SnapshotService(options));
@@ -1 +1 @@
1
- {"root":["../src/constants.ts","../src/index.ts","../src/jasmineUtils.ts","../src/matchers.ts","../src/snapshot.ts","../src/softAssert.ts","../src/softAssertService.ts","../src/softExpect.ts","../src/types.ts","../src/utils.ts","../src/api/index.ts","../src/matchers/snapshot.ts","../src/matchers/asymmetrics/asymmetricsUtils.ts","../src/matchers/asymmetrics/oneOf.ts","../src/matchers/browser/toHaveClipboardText.ts","../src/matchers/browser/toHaveLocalStorageItem.ts","../src/matchers/browser/toHaveTitle.ts","../src/matchers/browser/toHaveUrl.ts","../src/matchers/element/toBeClickable.ts","../src/matchers/element/toBeDisabled.ts","../src/matchers/element/toBeDisplayed.ts","../src/matchers/element/toBeDisplayedInViewport.ts","../src/matchers/element/toBeEnabled.ts","../src/matchers/element/toBeExisting.ts","../src/matchers/element/toBeFocused.ts","../src/matchers/element/toBeSelected.ts","../src/matchers/element/toHaveAttribute.ts","../src/matchers/element/toHaveChildren.ts","../src/matchers/element/toHaveComputedLabel.ts","../src/matchers/element/toHaveComputedRole.ts","../src/matchers/element/toHaveElementClass.ts","../src/matchers/element/toHaveElementProperty.ts","../src/matchers/element/toHaveHTML.ts","../src/matchers/element/toHaveHeight.ts","../src/matchers/element/toHaveHref.ts","../src/matchers/element/toHaveId.ts","../src/matchers/element/toHaveSize.ts","../src/matchers/element/toHaveStyle.ts","../src/matchers/element/toHaveText.ts","../src/matchers/element/toHaveValue.ts","../src/matchers/element/toHaveWidth.ts","../src/matchers/elements/toBeElementsArrayOfSize.ts","../src/matchers/mock/toBeRequested.ts","../src/matchers/mock/toBeRequestedTimes.ts","../src/matchers/mock/toBeRequestedWith.ts","../src/matchers/modifiers/some.ts","../src/util/commandOptionsUtils.ts","../src/util/elementsUtil.ts","../src/util/executeCommand.ts","../src/util/formatMessage.ts","../src/util/globalSingleton.ts","../src/util/numberOptionsUtil.ts","../src/util/refetchElements.ts","../src/util/stringUtil.ts","../src/util/waitUntil.ts"],"version":"5.9.3"}
1
+ {"version":"7.0.2","root":["../src/constants.ts","../src/index.ts","../src/jasmineUtils.ts","../src/matchers.ts","../src/snapshot.ts","../src/softAssert.ts","../src/softAssertService.ts","../src/softExpect.ts","../src/types.ts","../src/utils.ts","../src/api/index.ts","../src/matchers/snapshot.ts","../src/matchers/asymmetrics/asymmetricsUtils.ts","../src/matchers/asymmetrics/multiRemote.ts","../src/matchers/asymmetrics/oneOf.ts","../src/matchers/browser/toHaveClipboardText.ts","../src/matchers/browser/toHaveLocalStorageItem.ts","../src/matchers/browser/toHaveTitle.ts","../src/matchers/browser/toHaveUrl.ts","../src/matchers/element/toBeClickable.ts","../src/matchers/element/toBeDisabled.ts","../src/matchers/element/toBeDisplayed.ts","../src/matchers/element/toBeDisplayedInViewport.ts","../src/matchers/element/toBeEnabled.ts","../src/matchers/element/toBeExisting.ts","../src/matchers/element/toBeFocused.ts","../src/matchers/element/toBeSelected.ts","../src/matchers/element/toHaveAttribute.ts","../src/matchers/element/toHaveChildren.ts","../src/matchers/element/toHaveComputedLabel.ts","../src/matchers/element/toHaveComputedRole.ts","../src/matchers/element/toHaveElementClass.ts","../src/matchers/element/toHaveElementProperty.ts","../src/matchers/element/toHaveHTML.ts","../src/matchers/element/toHaveHeight.ts","../src/matchers/element/toHaveHref.ts","../src/matchers/element/toHaveId.ts","../src/matchers/element/toHaveSize.ts","../src/matchers/element/toHaveStyle.ts","../src/matchers/element/toHaveText.ts","../src/matchers/element/toHaveValue.ts","../src/matchers/element/toHaveWidth.ts","../src/matchers/elements/toBeElementsArrayOfSize.ts","../src/matchers/mock/toBeRequested.ts","../src/matchers/mock/toBeRequestedTimes.ts","../src/matchers/mock/toBeRequestedWith.ts","../src/matchers/modifiers/some.ts","../src/util/commandOptionsUtils.ts","../src/util/elementsUtil.ts","../src/util/executeBrowserCommand.ts","../src/util/executeCommand.ts","../src/util/formatMessage.ts","../src/util/globalSingleton.ts","../src/util/multiRemoteUtils.ts","../src/util/numberOptionsUtil.ts","../src/util/refetchElements.ts","../src/util/stringUtil.ts","../src/util/waitUntil.ts"],"packageJsons":["../node_modules/.pnpm/@jest+expect-utils@30.5.2/node_modules/@jest/expect-utils/package.json","../node_modules/.pnpm/@jest+schemas@30.5.0/node_modules/@jest/schemas/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/package.json","../node_modules/.pnpm/@types+deep-eql@4.0.2/node_modules/@types/deep-eql/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/node/package.json","../node_modules/.pnpm/@types+sinonjs__fake-timers@8.1.5/node_modules/@types/sinonjs__fake-timers/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/@types/ws/package.json","../node_modules/.pnpm/@vitest+pretty-format@5.0.2/node_modules/@vitest/pretty-format/package.json","../node_modules/.pnpm/@vitest+snapshot@5.0.2/node_modules/@vitest/snapshot/package.json","../node_modules/.pnpm/@vitest+utils@5.0.2/node_modules/@vitest/utils/package.json","../node_modules/.pnpm/@wdio+globals@9.31.3_expect-webdriverio@_webdriverio@9.32.0_supports-color@8.1.1_/node_modules/@wdio/globals/package.json","../node_modules/.pnpm/@wdio+protocols@9.31.5/node_modules/@wdio/protocols/package.json","../node_modules/.pnpm/@wdio+types@9.32.0/node_modules/@wdio/types/package.json","../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/package.json","../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/package.json","../node_modules/.pnpm/cheerio-select@2.1.0/node_modules/cheerio-select/lib/esm/package.json","../node_modules/.pnpm/cheerio-select@2.1.0/node_modules/cheerio-select/package.json","../node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/package.json","../node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/package.json","../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/package.json","../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/package.json","../node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/package.json","../node_modules/.pnpm/deep-eql@5.0.2/node_modules/deep-eql/package.json","../node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/esm/package.json","../node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/package.json","../node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/esm/package.json","../node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/package.json","../node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/package.json","../node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/package.json","../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/package.json","../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/package.json","../node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/dist/esm/package.json","../node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/package.json","../node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/package.json","../node_modules/.pnpm/entities@6.0.1/node_modules/entities/package.json","../node_modules/.pnpm/events@3.3.0/node_modules/events/package.json","../node_modules/.pnpm/expect@30.5.2/node_modules/expect/package.json","../node_modules/.pnpm/htmlparser2@10.0.0/node_modules/htmlparser2/dist/esm/package.json","../node_modules/.pnpm/htmlparser2@10.0.0/node_modules/htmlparser2/package.json","../node_modules/.pnpm/jest-diff@30.5.2/node_modules/jest-diff/package.json","../node_modules/.pnpm/jest-matcher-utils@30.5.2/node_modules/jest-matcher-utils/package.json","../node_modules/.pnpm/jest-mock@30.5.2/node_modules/jest-mock/package.json","../node_modules/.pnpm/parse5-htmlparser2-tree-adapter@7.1.0/node_modules/parse5-htmlparser2-tree-adapter/package.json","../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/package.json","../node_modules/.pnpm/pretty-format@30.5.1/node_modules/pretty-format/package.json","../node_modules/.pnpm/process@0.11.10/node_modules/process/package.json","../node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/package.json","../node_modules/.pnpm/string_decoder@1.1.1/node_modules/string_decoder/package.json","../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/package.json","../node_modules/.pnpm/undici@7.29.0/node_modules/undici/package.json","../node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/package.json","../node_modules/.pnpm/webdriver@9.32.0_supports-color@8.1.1/node_modules/webdriver/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/package.json","../node_modules/.pnpm/ws@8.21.3/node_modules/ws/package.json","../package.json"],"missingPackageJsons":["../node_modules/.pnpm/@jest+expect-utils@30.5.2/node_modules/@jest/expect-utils/build/package.json","../node_modules/.pnpm/@jest+schemas@30.5.0/node_modules/@jest/schemas/build/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/any/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/argument/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/array/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/async-iterator/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/awaited/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/bigint/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/boolean/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/clone/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/composite/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/computed/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/const/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/constructor-parameters/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/constructor/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/create/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/date/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/enum/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/error/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/exclude/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/extends/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/extract/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/function/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/guard/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/helpers/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/indexed/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/instance-type/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/instantiate/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/integer/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/intersect/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/intrinsic/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/iterator/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/keyof/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/literal/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/mapped/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/module/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/never/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/not/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/null/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/number/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/object/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/omit/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/optional/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/parameters/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/partial/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/patterns/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/pick/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/promise/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/readonly-optional/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/readonly/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/record/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/recursive/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/ref/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/regexp/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/registry/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/required/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/rest/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/return-type/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/schema/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/sets/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/static/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/string/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/symbol/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/symbols/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/template-literal/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/transform/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/tuple/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/type/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/uint8array/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/undefined/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/union/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/unknown/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/unsafe/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/cjs/type/void/package.json","../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/assert/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/assert/strict/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/async_hooks/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/buffer/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/child_process/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/cluster/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/console/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/constants/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/crypto/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/dgram/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/diagnostics_channel/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/dns/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/dns/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/domain/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/events/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/fs/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/fs/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/http/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/http2/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/https/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/inspector/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/inspector/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/module/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/net/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/node/assert/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/node/compatibility/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/node/dns/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/node/fs/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/node/readline/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/node/stream/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/node/timers/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/node/web-globals/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/os/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/path/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/path/posix/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/path/win32/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/perf_hooks/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/process/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/punycode/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/querystring/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/readline/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/readline/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/repl/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/stream/consumers/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/stream/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/stream/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/stream/web/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/string_decoder/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/timers/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/timers/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/tls/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/trace_events/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/tty/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/url/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/util/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/util/types/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/v8/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/vm/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/wasi/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/worker_threads/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/@types/zlib/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/assert/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/assert/strict/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/async_hooks/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/buffer/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/child_process/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/cluster/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/console/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/constants/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/crypto/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/dgram/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/diagnostics_channel/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/dns/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/dns/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/domain/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/events/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/fs/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/fs/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/http/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/http2/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/https/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/inspector/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/inspector/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/module/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/net/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/os/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/path/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/path/posix/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/path/win32/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/perf_hooks/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/process/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/punycode/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/querystring/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/readline/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/readline/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/repl/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/stream/consumers/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/stream/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/stream/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/stream/web/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/string_decoder/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/timers/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/timers/promises/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/tls/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/trace_events/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/tty/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/url/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/util/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/util/types/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/v8/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/vm/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/wasi/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/worker_threads/package.json","../node_modules/.pnpm/@types+node@24.19.0/node_modules/zlib/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/@types/events/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/@types/http/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/@types/https/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/@types/net/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/@types/stream/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/@types/tls/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/@types/url/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/@types/zlib/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/events/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/http/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/https/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/net/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/stream/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/tls/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/url/package.json","../node_modules/.pnpm/@types+ws@8.18.1/node_modules/zlib/package.json","../node_modules/.pnpm/@vitest+pretty-format@5.0.2/node_modules/@vitest/pretty-format/dist/package.json","../node_modules/.pnpm/@vitest+snapshot@5.0.2/node_modules/@vitest/snapshot/dist/package.json","../node_modules/.pnpm/@vitest+utils@5.0.2/node_modules/@vitest/utils/dist/package.json","../node_modules/.pnpm/@wdio+protocols@9.31.5/node_modules/@wdio/protocols/build/commands/package.json","../node_modules/.pnpm/@wdio+protocols@9.31.5/node_modules/@wdio/protocols/build/package.json","../node_modules/.pnpm/@wdio+protocols@9.31.5/node_modules/@wdio/protocols/build/protocols/package.json","../node_modules/.pnpm/@wdio+types@9.32.0/node_modules/@wdio/types/build/package.json","../node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/package.json","../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/package.json","../node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/package.json","../node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/package.json","../node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/package.json","../node_modules/.pnpm/expect@30.5.2/node_modules/expect/build/package.json","../node_modules/.pnpm/jest-diff@30.5.2/node_modules/jest-diff/build/package.json","../node_modules/.pnpm/jest-matcher-utils@30.5.2/node_modules/jest-matcher-utils/build/package.json","../node_modules/.pnpm/jest-mock@30.5.2/node_modules/jest-mock/build/package.json","../node_modules/.pnpm/node_modules/@types/assert/package.json","../node_modules/.pnpm/node_modules/@types/assert/strict/package.json","../node_modules/.pnpm/node_modules/@types/async_hooks/package.json","../node_modules/.pnpm/node_modules/@types/child_process/package.json","../node_modules/.pnpm/node_modules/@types/cluster/package.json","../node_modules/.pnpm/node_modules/@types/console/package.json","../node_modules/.pnpm/node_modules/@types/constants/package.json","../node_modules/.pnpm/node_modules/@types/crypto/package.json","../node_modules/.pnpm/node_modules/@types/dgram/package.json","../node_modules/.pnpm/node_modules/@types/diagnostics_channel/package.json","../node_modules/.pnpm/node_modules/@types/dns/package.json","../node_modules/.pnpm/node_modules/@types/dns/promises/package.json","../node_modules/.pnpm/node_modules/@types/domain/package.json","../node_modules/.pnpm/node_modules/@types/events/package.json","../node_modules/.pnpm/node_modules/@types/fs/package.json","../node_modules/.pnpm/node_modules/@types/fs/promises/package.json","../node_modules/.pnpm/node_modules/@types/http/package.json","../node_modules/.pnpm/node_modules/@types/http2/package.json","../node_modules/.pnpm/node_modules/@types/https/package.json","../node_modules/.pnpm/node_modules/@types/inspector/package.json","../node_modules/.pnpm/node_modules/@types/inspector/promises/package.json","../node_modules/.pnpm/node_modules/@types/module/package.json","../node_modules/.pnpm/node_modules/@types/net/package.json","../node_modules/.pnpm/node_modules/@types/os/package.json","../node_modules/.pnpm/node_modules/@types/path/package.json","../node_modules/.pnpm/node_modules/@types/path/posix/package.json","../node_modules/.pnpm/node_modules/@types/path/win32/package.json","../node_modules/.pnpm/node_modules/@types/perf_hooks/package.json","../node_modules/.pnpm/node_modules/@types/process/package.json","../node_modules/.pnpm/node_modules/@types/punycode/package.json","../node_modules/.pnpm/node_modules/@types/puppeteer-core/package.json","../node_modules/.pnpm/node_modules/@types/querystring/package.json","../node_modules/.pnpm/node_modules/@types/readline/package.json","../node_modules/.pnpm/node_modules/@types/readline/promises/package.json","../node_modules/.pnpm/node_modules/@types/repl/package.json","../node_modules/.pnpm/node_modules/@types/stream/consumers/package.json","../node_modules/.pnpm/node_modules/@types/stream/package.json","../node_modules/.pnpm/node_modules/@types/stream/promises/package.json","../node_modules/.pnpm/node_modules/@types/stream/web/package.json","../node_modules/.pnpm/node_modules/@types/string_decoder/package.json","../node_modules/.pnpm/node_modules/@types/timers/package.json","../node_modules/.pnpm/node_modules/@types/timers/promises/package.json","../node_modules/.pnpm/node_modules/@types/tls/package.json","../node_modules/.pnpm/node_modules/@types/trace_events/package.json","../node_modules/.pnpm/node_modules/@types/tty/package.json","../node_modules/.pnpm/node_modules/@types/url/package.json","../node_modules/.pnpm/node_modules/@types/util/package.json","../node_modules/.pnpm/node_modules/@types/util/types/package.json","../node_modules/.pnpm/node_modules/@types/v8/package.json","../node_modules/.pnpm/node_modules/@types/vm/package.json","../node_modules/.pnpm/node_modules/@types/wasi/package.json","../node_modules/.pnpm/node_modules/@types/worker_threads/package.json","../node_modules/.pnpm/node_modules/@types/zlib/package.json","../node_modules/.pnpm/node_modules/assert/package.json","../node_modules/.pnpm/node_modules/assert/strict/package.json","../node_modules/.pnpm/node_modules/async_hooks/package.json","../node_modules/.pnpm/node_modules/child_process/package.json","../node_modules/.pnpm/node_modules/cluster/package.json","../node_modules/.pnpm/node_modules/console/package.json","../node_modules/.pnpm/node_modules/constants/package.json","../node_modules/.pnpm/node_modules/crypto/package.json","../node_modules/.pnpm/node_modules/dgram/package.json","../node_modules/.pnpm/node_modules/diagnostics_channel/package.json","../node_modules/.pnpm/node_modules/dns/package.json","../node_modules/.pnpm/node_modules/dns/promises/package.json","../node_modules/.pnpm/node_modules/domain/package.json","../node_modules/.pnpm/node_modules/fs/package.json","../node_modules/.pnpm/node_modules/fs/promises/package.json","../node_modules/.pnpm/node_modules/http/package.json","../node_modules/.pnpm/node_modules/http2/package.json","../node_modules/.pnpm/node_modules/https/package.json","../node_modules/.pnpm/node_modules/inspector/package.json","../node_modules/.pnpm/node_modules/inspector/promises/package.json","../node_modules/.pnpm/node_modules/module/package.json","../node_modules/.pnpm/node_modules/net/package.json","../node_modules/.pnpm/node_modules/os/package.json","../node_modules/.pnpm/node_modules/path/package.json","../node_modules/.pnpm/node_modules/path/posix/package.json","../node_modules/.pnpm/node_modules/path/win32/package.json","../node_modules/.pnpm/node_modules/perf_hooks/package.json","../node_modules/.pnpm/node_modules/puppeteer-core/package.json","../node_modules/.pnpm/node_modules/querystring/package.json","../node_modules/.pnpm/node_modules/readline/package.json","../node_modules/.pnpm/node_modules/readline/promises/package.json","../node_modules/.pnpm/node_modules/repl/package.json","../node_modules/.pnpm/node_modules/stream/consumers/package.json","../node_modules/.pnpm/node_modules/stream/package.json","../node_modules/.pnpm/node_modules/stream/promises/package.json","../node_modules/.pnpm/node_modules/stream/web/package.json","../node_modules/.pnpm/node_modules/timers/package.json","../node_modules/.pnpm/node_modules/timers/promises/package.json","../node_modules/.pnpm/node_modules/tls/package.json","../node_modules/.pnpm/node_modules/trace_events/package.json","../node_modules/.pnpm/node_modules/tty/package.json","../node_modules/.pnpm/node_modules/url/package.json","../node_modules/.pnpm/node_modules/util/package.json","../node_modules/.pnpm/node_modules/util/types/package.json","../node_modules/.pnpm/node_modules/v8/package.json","../node_modules/.pnpm/node_modules/vm/package.json","../node_modules/.pnpm/node_modules/wasi/package.json","../node_modules/.pnpm/node_modules/worker_threads/package.json","../node_modules/.pnpm/node_modules/zlib/package.json","../node_modules/.pnpm/parse5-htmlparser2-tree-adapter@7.1.0/node_modules/parse5-htmlparser2-tree-adapter/dist/package.json","../node_modules/.pnpm/parse5@7.3.0/node_modules/entities/decode/package.json","../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/package.json","../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/package.json","../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/package.json","../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/serializer/package.json","../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/package.json","../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tree-adapters/package.json","../node_modules/.pnpm/pretty-format@30.5.1/node_modules/pretty-format/build/package.json","../node_modules/.pnpm/undici@7.29.0/node_modules/undici/types/package.json","../node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/package.json","../node_modules/.pnpm/webdriver@9.32.0_supports-color@8.1.1/node_modules/webdriver/build/bidi/package.json","../node_modules/.pnpm/webdriver@9.32.0_supports-color@8.1.1/node_modules/webdriver/build/package.json","../node_modules/.pnpm/webdriver@9.32.0_supports-color@8.1.1/node_modules/webdriver/build/request/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/@sinonjs/fake-timers/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/@types/puppeteer-core/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/puppeteer-core/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/build/commands/browser/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/build/commands/element/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/build/commands/mobile/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/build/commands/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/build/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/build/session/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/build/utils/actions/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/build/utils/interception/package.json","../node_modules/.pnpm/webdriverio@9.32.0_supports-color@8.1.1/node_modules/webdriverio/build/utils/package.json","../node_modules/types/expect-webdriverio.d.ts/package.json","../node_modules/@types/assert/package.json","../node_modules/@types/assert/strict/package.json","../node_modules/@types/async_hooks/package.json","../node_modules/@types/child_process/package.json","../node_modules/@types/cluster/package.json","../node_modules/@types/console/package.json","../node_modules/@types/constants/package.json","../node_modules/@types/crypto/package.json","../node_modules/@types/dgram/package.json","../node_modules/@types/diagnostics_channel/package.json","../node_modules/@types/dns/package.json","../node_modules/@types/dns/promises/package.json","../node_modules/@types/domain/package.json","../node_modules/@types/events/package.json","../node_modules/@types/fs/package.json","../node_modules/@types/fs/promises/package.json","../node_modules/@types/http/package.json","../node_modules/@types/http2/package.json","../node_modules/@types/https/package.json","../node_modules/@types/inspector/package.json","../node_modules/@types/inspector/promises/package.json","../node_modules/@types/module/package.json","../node_modules/@types/net/package.json","../node_modules/@types/os/package.json","../node_modules/@types/path/package.json","../node_modules/@types/path/posix/package.json","../node_modules/@types/path/win32/package.json","../node_modules/@types/perf_hooks/package.json","../node_modules/@types/process/package.json","../node_modules/@types/punycode/package.json","../node_modules/@types/puppeteer-core/package.json","../node_modules/@types/querystring/package.json","../node_modules/@types/readline/package.json","../node_modules/@types/readline/promises/package.json","../node_modules/@types/repl/package.json","../node_modules/@types/stream/consumers/package.json","../node_modules/@types/stream/package.json","../node_modules/@types/stream/promises/package.json","../node_modules/@types/stream/web/package.json","../node_modules/@types/string_decoder/package.json","../node_modules/@types/timers/package.json","../node_modules/@types/timers/promises/package.json","../node_modules/@types/tls/package.json","../node_modules/@types/trace_events/package.json","../node_modules/@types/tty/package.json","../node_modules/@types/url/package.json","../node_modules/@types/util/package.json","../node_modules/@types/util/types/package.json","../node_modules/@types/v8/package.json","../node_modules/@types/vm/package.json","../node_modules/@types/wasi/package.json","../node_modules/@types/wdio__globals/types/package.json","../node_modules/@types/worker_threads/package.json","../node_modules/@types/zlib/package.json","../node_modules/@vitest/snapshot/environment/package.json","../node_modules/@wdio/globals/types/package.json","../node_modules/assert/package.json","../node_modules/assert/strict/package.json","../node_modules/async_hooks/package.json","../node_modules/child_process/package.json","../node_modules/cluster/package.json","../node_modules/console/package.json","../node_modules/constants/package.json","../node_modules/crypto/package.json","../node_modules/dgram/package.json","../node_modules/diagnostics_channel/package.json","../node_modules/dns/package.json","../node_modules/dns/promises/package.json","../node_modules/domain/package.json","../node_modules/events/package.json","../node_modules/fs/package.json","../node_modules/fs/promises/package.json","../node_modules/http/package.json","../node_modules/http2/package.json","../node_modules/https/package.json","../node_modules/inspector/package.json","../node_modules/inspector/promises/package.json","../node_modules/module/package.json","../node_modules/net/package.json","../node_modules/os/package.json","../node_modules/path/package.json","../node_modules/path/posix/package.json","../node_modules/path/win32/package.json","../node_modules/perf_hooks/package.json","../node_modules/process/package.json","../node_modules/punycode/package.json","../node_modules/puppeteer-core/package.json","../node_modules/querystring/package.json","../node_modules/readline/package.json","../node_modules/readline/promises/package.json","../node_modules/repl/package.json","../node_modules/stream/consumers/package.json","../node_modules/stream/package.json","../node_modules/stream/promises/package.json","../node_modules/stream/web/package.json","../node_modules/string_decoder/package.json","../node_modules/timers/package.json","../node_modules/timers/promises/package.json","../node_modules/tls/package.json","../node_modules/trace_events/package.json","../node_modules/tty/package.json","../node_modules/url/package.json","../node_modules/util/package.json","../node_modules/util/types/package.json","../node_modules/v8/package.json","../node_modules/vm/package.json","../node_modules/wasi/package.json","../node_modules/worker_threads/package.json","../node_modules/zlib/package.json"]}
@@ -1,4 +1,5 @@
1
1
  import { isArrayContainingMatcher } from '../utils.js';
2
+ import { hasMultiRemoteFlag } from './multiRemoteUtils.js';
2
3
  export const wrapExpectedWithArray = (elements, actual, expected) => {
3
4
  if (Array.isArray(elements) && Array.isArray(actual) && !Array.isArray(expected) && !isArrayContainingMatcher(expected)) {
4
5
  expected = Array(actual.length).fill(expected);
@@ -22,27 +23,33 @@ const isSelector = (obj) => {
22
23
  };
23
24
  export const isElementArray = (obj) => {
24
25
  return isSelector(obj)
25
- && 'foundWith' in obj;
26
+ && 'foundWith' in obj
27
+ && !isMultiRemote(obj);
26
28
  };
27
29
  export const isStrictlyElementArray = (obj) => {
28
30
  return isElementArray(obj)
29
31
  && Array.isArray(obj)
30
- && 'getElements' in obj;
32
+ && 'getElements' in obj
33
+ && !isMultiRemote(obj);
31
34
  };
32
35
  export const isElement = (obj) => {
33
36
  return isSelector(obj)
34
37
  && !Array.isArray(obj)
35
- && 'getElement' in obj;
38
+ && 'getElement' in obj
39
+ && !isMultiRemote(obj);
36
40
  };
37
41
  export const isElementArrayLike = (obj) => {
38
- return !!obj && (isStrictlyElementArray(obj) || (Array.isArray(obj) && obj.every(isElement)));
42
+ return !!obj && (isStrictlyElementArray(obj) || (Array.isArray(obj) && Array.prototype.every.call(obj, isElement)));
39
43
  };
40
44
  export const isArrayOfElement = (obj) => {
41
- return Array.isArray(obj) && obj.every(isElement);
45
+ return Array.isArray(obj) && !isMultiRemote(obj) && Array.prototype.every.call(obj, isElement);
42
46
  };
43
47
  export const isElementOrArrayLike = (obj) => {
44
48
  return !!obj && (isElement(obj) || isElementArrayLike(obj));
45
49
  };
50
+ export const isElementOrArrayOrMultiRemoteElementLike = (obj) => {
51
+ return !!obj && (isElement(obj) || isElementArrayLike(obj) || isMultiRemoteElementLike(obj));
52
+ };
46
53
  export const awaitElementOrArray = async (received) => {
47
54
  if (!received || typeof received !== 'object') {
48
55
  return { other: received };
@@ -51,9 +58,12 @@ export const awaitElementOrArray = async (received) => {
51
58
  if (awaitedElements instanceof Promise) {
52
59
  awaitedElements = await awaitedElements;
53
60
  }
54
- if (!isElementOrArrayLike(awaitedElements)) {
61
+ if (!isElementOrArrayOrMultiRemoteElementLike(awaitedElements)) {
55
62
  return { other: awaitedElements };
56
63
  }
64
+ if (isMultiRemoteElement(awaitedElements)) {
65
+ return { selector: awaitedElements, multiRemoteSelector: awaitedElements };
66
+ }
57
67
  if ('getElement' in awaitedElements) {
58
68
  const element = await awaitedElements.getElement();
59
69
  return { selector: element, element };
@@ -77,3 +87,22 @@ export const awaitElementArray = async (received) => {
77
87
  }
78
88
  return { elements: awaitedElements };
79
89
  };
90
+ const isMultiRemote = (obj) => {
91
+ return hasMultiRemoteFlag(obj);
92
+ };
93
+ export const isMultiRemoteElement = (obj) => {
94
+ return isMultiRemote(obj) && !Array.isArray(obj) && 'selector' in obj;
95
+ };
96
+ export const isMultiRemoteElements = (obj) => {
97
+ return Array.isArray(obj) && obj.length > 0 && !isMultiRemoteElementArray(obj)
98
+ && Array.prototype.every.call(obj, isMultiRemoteElement);
99
+ };
100
+ export const isMultiRemoteElementArray = (obj) => {
101
+ return hasMultiRemoteFlag(obj) && 'parent' in obj && 'foundWith' in obj && 'selector' in obj;
102
+ };
103
+ export const isMultiRemoteElementLike = (obj) => {
104
+ return isMultiRemoteElement(obj) || isMultiRemoteElementsLike(obj);
105
+ };
106
+ export const isMultiRemoteElementsLike = (obj) => {
107
+ return isMultiRemoteElementArray(obj) || isMultiRemoteElements(obj);
108
+ };
@@ -0,0 +1,37 @@
1
+ import { getPerInstanceValues, hasSameInstanceNames, isMultiRemoteBrowser } from './multiRemoteUtils.js';
2
+ export async function executeBrowserCommand({ browser, expectedValue, compare, isNot = false, }) {
3
+ if (isMultiRemoteBrowser(browser)) {
4
+ const { instances } = browser;
5
+ const perInstanceValues = getPerInstanceValues(expectedValue);
6
+ const expected = perInstanceValues ?? Object.fromEntries(instances.map((name) => [name, expectedValue]));
7
+ const forceFailure = (!!perInstanceValues && !hasSameInstanceNames(perInstanceValues, instances))
8
+ || Object.values(expected).some(Array.isArray);
9
+ const arrayResults = await Promise.all(instances.map(async (name) => {
10
+ let singleBrowser;
11
+ try {
12
+ singleBrowser = browser.getInstance(name);
13
+ }
14
+ catch {
15
+ return { success: false, actual: undefined, multiRemoteBrowserName: name };
16
+ }
17
+ const isExpected = name in expected;
18
+ const results = await compare(singleBrowser, forceFailure || !isExpected ? undefined : expected[name]);
19
+ return { ...results, multiRemoteBrowserName: name };
20
+ }));
21
+ const actual = arrayResults.reduce((acc, result) => {
22
+ acc[result.multiRemoteBrowserName] = result.actual;
23
+ return acc;
24
+ }, {});
25
+ if (forceFailure) {
26
+ return { actual, success: isNot, abort: true, subject: browser, expected };
27
+ }
28
+ const success = isNot ? arrayResults.some(result => result.success) : arrayResults.every(result => result.success);
29
+ return { actual, success, subject: browser, expected };
30
+ }
31
+ const forceFailure = getPerInstanceValues(expectedValue) !== undefined || Array.isArray(expectedValue);
32
+ const results = await compare(browser, forceFailure ? undefined : expectedValue);
33
+ if (forceFailure) {
34
+ return { ...results, success: isNot, abort: true, subject: browser, expected: expectedValue };
35
+ }
36
+ return { ...results, subject: browser, expected: expectedValue };
37
+ }