webdriverio 8.34.0 → 8.35.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.
- package/build/commands/browser/$$.d.ts.map +1 -1
- package/build/commands/browser/$$.js +15 -2
- package/build/commands/browser/getWindowSize.js +1 -1
- package/build/commands/browser/mock.d.ts.map +1 -1
- package/build/commands/browser/mock.js +1 -1
- package/build/commands/browser/setWindowSize.js +1 -1
- package/build/commands/browser/throttle.js +1 -1
- package/build/commands/browser/throttleNetwork.js +1 -1
- package/build/commands/element/click.js +1 -1
- package/build/commands/element/custom$$.d.ts.map +1 -1
- package/build/commands/element/custom$$.js +2 -1
- package/build/commands/element/custom$.js +1 -1
- package/build/commands/element/doubleClick.js +1 -1
- package/build/commands/element/dragAndDrop.js +1 -1
- package/build/commands/element/getCSSProperty.d.ts.map +1 -1
- package/build/commands/element/getCSSProperty.js +2 -1
- package/build/commands/element/getHTML.js +1 -1
- package/build/commands/element/getProperty.js +1 -1
- package/build/commands/element/isClickable.js +1 -1
- package/build/commands/element/isDisplayed.d.ts.map +1 -1
- package/build/commands/element/isDisplayed.js +2 -1
- package/build/commands/element/isDisplayedInViewport.js +1 -1
- package/build/commands/element/isEqual.js +1 -1
- package/build/commands/element/isFocused.js +1 -1
- package/build/commands/element/isStable.js +1 -1
- package/build/commands/element/moveTo.js +1 -1
- package/build/commands/element/react$$.d.ts.map +1 -1
- package/build/commands/element/react$$.js +2 -1
- package/build/commands/element/react$.js +1 -1
- package/build/commands/element/scrollIntoView.js +1 -1
- package/build/commands/element/shadow$$.d.ts.map +1 -1
- package/build/commands/element/shadow$$.js +2 -1
- package/build/commands/element/shadow$.js +1 -1
- package/build/middlewares.d.ts.map +1 -1
- package/build/middlewares.js +2 -1
- package/build/utils/getElementObject.d.ts.map +1 -1
- package/build/utils/getElementObject.js +3 -2
- package/build/utils/index.d.ts +0 -4
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +1 -8
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAIvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,EAAE,CACpB,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,QAAQ,EAAE,QAAQ,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAIvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,EAAE,CACpB,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,QAAQ,EAAE,QAAQ,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,WAAW,EAAE,qCAiClF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { findElements, enhanceElementsArray, isElement, findElement } from '../../utils/index.js';
|
|
2
|
-
import { getElements } from '../../utils/getElementObject.js';
|
|
2
|
+
import { getElements, getElement } from '../../utils/getElementObject.js';
|
|
3
3
|
/**
|
|
4
4
|
* The `$$` command is a short and handy way in order to fetch multiple elements on the page.
|
|
5
5
|
* It returns a `ChainablePromiseArray` containing a set of WebdriverIO elements.
|
|
@@ -54,6 +54,19 @@ export async function $$(selector) {
|
|
|
54
54
|
$el && res.push($el);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Define scope of element. In most cases it is `this` but if we pass through
|
|
59
|
+
* an element object from the browser runner we have to look into the parent
|
|
60
|
+
* provided by the selector object. Since these objects are passed through
|
|
61
|
+
* as raw objects without any prototype we have to check if the `$` or `$$`
|
|
62
|
+
* is defined on the object itself and if not, create a new element object.
|
|
63
|
+
*/
|
|
64
|
+
let parent = res.length > 0 ? res[0].parent || this : this;
|
|
65
|
+
if (typeof parent.$ === 'undefined') {
|
|
66
|
+
parent = 'selector' in parent
|
|
67
|
+
? getElement.call(this, parent.selector, parent)
|
|
68
|
+
: this;
|
|
69
|
+
}
|
|
57
70
|
const elements = await getElements.call(this, selector, res);
|
|
58
|
-
return enhanceElementsArray(elements,
|
|
71
|
+
return enhanceElementsArray(elements, parent, selector);
|
|
59
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/mock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/mock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,YAAY,MAAM,mCAAmC,CAAA;AAGjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAA;AAEvF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAY,CAAC,CAAM,CAAA;AAClE,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAM,CAAA;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGG;AACH,wBAAsB,IAAI,CACtB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,GAAG,EAAE,MAAM,GAAG,MAAM,EACpB,aAAa,CAAC,EAAE,iBAAiB,iBA6DpC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
1
2
|
import DevtoolsNetworkInterception from '../../utils/interception/devtools.js';
|
|
2
3
|
import WebDriverNetworkInterception from '../../utils/interception/webdriver.js';
|
|
3
|
-
import { getBrowserObject } from '../../utils/index.js';
|
|
4
4
|
export const SESSION_MOCKS = {};
|
|
5
5
|
export const CDP_SESSIONS = {};
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/custom$$.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/custom$$.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,QAAQ,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,YAAY,EAAE,MAAM,EACpB,GAAG,iBAAiB,EAAE,GAAG,EAAE,GAC5B,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAkCnC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ELEMENT_KEY } from 'webdriver';
|
|
2
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
2
3
|
import { getElements } from '../../utils/getElementObject.js';
|
|
3
|
-
import {
|
|
4
|
+
import { enhanceElementsArray } from '../../utils/index.js';
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
6
7
|
* The `customs$$` allows you to use a custom strategy declared by using `browser.addLocatorStrategy`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ELEMENT_KEY } from 'webdriver';
|
|
2
2
|
import { getElement } from '../../utils/getElementObject.js';
|
|
3
|
-
import { getBrowserObject } from '
|
|
3
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
6
6
|
* The `custom$` allows you to use a custom strategy declared by using `browser.addLocatorStrategy`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCSSProperty.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getCSSProperty.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getCSSProperty.d.ts","sourceRoot":"","sources":["../../../src/commands/element/getCSSProperty.ts"],"names":[],"mappings":"AAKA,KAAK,aAAa,GAAG,UAAU,GAAG,SAAS,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,wBAAsB,cAAc,CAChC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,aAAa,oDAehC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import cssShorthandProps from 'css-shorthand-properties';
|
|
2
|
-
import { getBrowserObject
|
|
2
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
3
|
+
import { parseCSS } from '../../utils/index.js';
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
6
|
* Get a css property from a DOM-element selected by given selector. The return value
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getBrowserObject } from '
|
|
1
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
2
2
|
import getPropertyScript from '../../scripts/getProperty.js';
|
|
3
3
|
/**
|
|
4
4
|
* The Get Element Property command will return the result of getting a property of an element.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isDisplayed.d.ts","sourceRoot":"","sources":["../../../src/commands/element/isDisplayed.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isDisplayed.d.ts","sourceRoot":"","sources":["../../../src/commands/element/isDisplayed.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,wBAAsB,WAAW,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,oBAoB3D"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ELEMENT_KEY } from 'webdriver';
|
|
2
|
-
import { getBrowserObject
|
|
2
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
3
|
+
import { hasElementId } from '../../utils/index.js';
|
|
3
4
|
import isElementDisplayedScript from '../../scripts/isElementDisplayed.js';
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ELEMENT_KEY } from 'webdriver';
|
|
2
|
-
import { getBrowserObject } from '
|
|
2
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
3
3
|
const getWebElement = (el) => ({
|
|
4
4
|
[ELEMENT_KEY]: el.elementId, // w3c compatible
|
|
5
5
|
ELEMENT: el.elementId // jsonwp compatible
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/react$$.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/react$$.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAI1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,OAAO,CACzB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,EAChB,EAAE,KAAU,EAAE,KAAU,EAAE,GAAE,oBAAyB,qCAgBxD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import url from 'node:url';
|
|
3
3
|
import { resolve } from 'import-meta-resolve';
|
|
4
|
-
import {
|
|
4
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
5
|
+
import { enhanceElementsArray } from '../../utils/index.js';
|
|
5
6
|
import { getElements } from '../../utils/getElementObject.js';
|
|
6
7
|
import { waitToLoadReact, react$$ as react$$Script } from '../../scripts/resq.js';
|
|
7
8
|
let resqScript;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import url from 'node:url';
|
|
3
3
|
import { resolve } from 'import-meta-resolve';
|
|
4
|
-
import { getBrowserObject } from '
|
|
4
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
5
5
|
import { getElement } from '../../utils/getElementObject.js';
|
|
6
6
|
import { waitToLoadReact, react$ as react$Script } from '../../scripts/resq.js';
|
|
7
7
|
let resqScript;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import logger from '@wdio/logger';
|
|
2
2
|
import { ELEMENT_KEY } from 'webdriver';
|
|
3
|
-
import { getBrowserObject } from '
|
|
3
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
4
4
|
const log = logger('webdriverio');
|
|
5
5
|
function scrollIntoViewWeb(options = { block: 'start', inline: 'nearest' }) {
|
|
6
6
|
const browser = getBrowserObject(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadow$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/shadow$$.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shadow$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/shadow$$.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,QAAQ,CAC1B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,qCAiBnB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import logger from '@wdio/logger';
|
|
2
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
2
3
|
import { SHADOW_ELEMENT_KEY } from 'webdriver';
|
|
3
4
|
import { shadowFnFactory } from '../../scripts/shadowFnFactory.js';
|
|
4
5
|
import { getElements } from '../../utils/getElementObject.js';
|
|
5
|
-
import {
|
|
6
|
+
import { enhanceElementsArray } from '../../utils/index.js';
|
|
6
7
|
import { findStrategy } from '../../utils/findStrategy.js';
|
|
7
8
|
const log = logger('webdriverio');
|
|
8
9
|
/**
|
|
@@ -2,7 +2,7 @@ import logger from '@wdio/logger';
|
|
|
2
2
|
import { SHADOW_ELEMENT_KEY } from 'webdriver';
|
|
3
3
|
import { shadowFnFactory } from '../../scripts/shadowFnFactory.js';
|
|
4
4
|
import { getElement } from '../../utils/getElementObject.js';
|
|
5
|
-
import { getBrowserObject } from '
|
|
5
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
6
6
|
import { findStrategy } from '../../utils/findStrategy.js';
|
|
7
7
|
const log = logger('webdriverio');
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middlewares.d.ts","sourceRoot":"","sources":["../src/middlewares.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"middlewares.d.ts","sourceRoot":"","sources":["../src/middlewares.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,OAAQ,QAAQ,mBAAmB,MAAM,aAAa,QAAQ,YACvC,mBAAmB,WAAW,GAAG,EAAE,QAsCzF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,gBACd,QAAQ,mBACN,MAAM,YAAY,OAAO,QAU3C,CAAA"}
|
package/build/middlewares.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ELEMENT_KEY } from 'webdriver';
|
|
2
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
2
3
|
import refetchElement from './utils/refetchElement.js';
|
|
3
4
|
import implicitWait from './utils/implicitWait.js';
|
|
4
|
-
import {
|
|
5
|
+
import { isStaleElementError } from './utils/index.js';
|
|
5
6
|
/**
|
|
6
7
|
* This method is an command wrapper for elements that checks if a command is called
|
|
7
8
|
* that wasn't found on the page and automatically waits for it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getElementObject.d.ts","sourceRoot":"","sources":["../../src/utils/getElementObject.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getElementObject.d.ts","sourceRoot":"","sources":["../../src/utils/getElementObject.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAKvD,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,aAAa,CAAA;AAEzD,UAAU,eAAe;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC5B;AAED,UAAU,sBAAsB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,cAAM,cAAe,SAAQ,KAAK;gBAClB,GAAG,EAAE,KAAK,GAAG,sBAAsB;CAWlD;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SACb,YAAY,OAAO,GAAG,mBAAmB,aACpC,QAAQ,QACb,gBAAgB,GAAG,KAAK,UACvB,eAAe,KACvB,mBAwDF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,SACd,YAAY,OAAO,GAAG,mBAAmB,YACrC,QAAQ,GAAG,gBAAgB,EAAE,GAAG,mBAAmB,EAAE,gBACjD,CAAC,gBAAgB,GAAG,KAAK,GAAG,cAAc,CAAC,EAAE,UACpD,eAAe,KACvB,mBAAmB,EAmErB,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { webdriverMonad, wrapCommand } from '@wdio/utils';
|
|
2
2
|
import clone from 'lodash.clonedeep';
|
|
3
3
|
import { ELEMENT_KEY } from 'webdriver';
|
|
4
|
-
import { getBrowserObject
|
|
4
|
+
import { getBrowserObject } from '@wdio/utils';
|
|
5
|
+
import { getPrototype as getWDIOPrototype, getElementFromResponse } from './index.js';
|
|
5
6
|
import { elementErrorHandler } from '../middlewares.js';
|
|
6
7
|
import * as browserCommands from '../commands/browser.js';
|
|
7
8
|
class WebDriverError extends Error {
|
|
@@ -97,7 +98,7 @@ export const getElements = function getElements(selector, elemResponse, props =
|
|
|
97
98
|
/**
|
|
98
99
|
* if we already deal with an element, just return it
|
|
99
100
|
*/
|
|
100
|
-
if (res.selector) {
|
|
101
|
+
if (res.selector && '$$' in res) {
|
|
101
102
|
return res;
|
|
102
103
|
}
|
|
103
104
|
propertiesObject.scope = { value: 'element' };
|
package/build/utils/index.d.ts
CHANGED
|
@@ -15,10 +15,6 @@ export declare const getPrototype: (scope: 'browser' | 'element') => Record<stri
|
|
|
15
15
|
* @return {?string} element id or null if element couldn't be found
|
|
16
16
|
*/
|
|
17
17
|
export declare const getElementFromResponse: (res?: ElementReference) => string | null;
|
|
18
|
-
/**
|
|
19
|
-
* traverse up the scope chain until browser element was reached
|
|
20
|
-
*/
|
|
21
|
-
export declare function getBrowserObject(elem: WebdriverIO.Element | WebdriverIO.Browser): WebdriverIO.Browser;
|
|
22
18
|
/**
|
|
23
19
|
* parse css values to a better format
|
|
24
20
|
* @param {string} cssPropertyValue result of WebDriver call
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAOvD,OAAO,KAAK,EAAmB,QAAQ,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAOtG,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QAAG,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;KAAE;CACnE;AAiBD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,SAAS,GAAG,SAAS,uCAexD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,SAAU,gBAAgB,kBAuB5D,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAOvD,OAAO,KAAK,EAAmB,QAAQ,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAOtG,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QAAG,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;KAAE;CACnE;AAiBD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,SAAS,GAAG,SAAS,uCAexD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,SAAU,gBAAgB,kBAuB5D,CAAA;AAWD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAE,gBAAgB,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,kBAkDvE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAE,KAAK,EAAE,MAAM,EAAE,UAAU,UAAQ,YAoB9D;AAuBD,wBAAgB,SAAS,CAAE,CAAC,EAAE,QAAQ,gBAMrC;AAED,wBAAgB,mBAAmB,CAAE,GAAG,EAAE,KAAK,WAS9C;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC7B,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,QAAQ,EAAE,QAAQ,iDA+ErB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAC9B,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,EAC/C,QAAQ,EAAE,QAAQ,+BAkDrB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,GAAG,OAkBpD;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,iDAuC9D;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,UAInD;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,iBAK3D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAE,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAcnE;AAED,wBAAsB,YAAY,CAAE,OAAO,EAAE,WAAW,CAAC,OAAO,oBAoB/D;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,kBAAkB,UACnF,MAAM,mBAAmB,MAAM,SAAS,WAAW,KAAK,wBAAwB,UAOjG;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,aACnB,mBAAmB,EAAE,UACvB,YAAY,OAAO,GAAG,mBAAmB,YACvC,QAAQ,GAAG,gBAAgB,EAAE,GAAG,mBAAmB,EAAE,8BAExD,GAAG,EAAE,6BAuCf,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,wBAAyB,MAAM,YAAgD,CAAA;AAElG;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SACvB,OAAO,MAAM,EAAE,MAAM,CAAC,SACrB,OAAO,MAAM,EAAE,MAAM,CAAC,YAShC,CAAA"}
|
package/build/utils/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import GraphemeSplitter from 'grapheme-splitter';
|
|
|
7
7
|
import logger from '@wdio/logger';
|
|
8
8
|
import isPlainObject from 'is-plain-obj';
|
|
9
9
|
import { ELEMENT_KEY } from 'webdriver';
|
|
10
|
-
import { UNICODE_CHARACTERS, asyncIterators } from '@wdio/utils';
|
|
10
|
+
import { UNICODE_CHARACTERS, asyncIterators, getBrowserObject } from '@wdio/utils';
|
|
11
11
|
import * as browserCommands from '../commands/browser.js';
|
|
12
12
|
import * as elementCommands from '../commands/element.js';
|
|
13
13
|
import querySelectorAllDeep from './thirdParty/querySelectorShadowDom.js';
|
|
@@ -70,13 +70,6 @@ export const getElementFromResponse = (res) => {
|
|
|
70
70
|
}
|
|
71
71
|
return null;
|
|
72
72
|
};
|
|
73
|
-
/**
|
|
74
|
-
* traverse up the scope chain until browser element was reached
|
|
75
|
-
*/
|
|
76
|
-
export function getBrowserObject(elem) {
|
|
77
|
-
const elemObject = elem;
|
|
78
|
-
return elemObject.parent ? getBrowserObject(elemObject.parent) : elem;
|
|
79
|
-
}
|
|
80
73
|
function sanitizeCSS(value) {
|
|
81
74
|
/* istanbul ignore next */
|
|
82
75
|
if (!value) {
|
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": "8.
|
|
4
|
+
"version": "8.35.0",
|
|
5
5
|
"homepage": "https://webdriver.io",
|
|
6
6
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -69,17 +69,17 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@types/node": "^20.1.0",
|
|
72
|
-
"@wdio/config": "8.
|
|
72
|
+
"@wdio/config": "8.35.0",
|
|
73
73
|
"@wdio/logger": "8.28.0",
|
|
74
74
|
"@wdio/protocols": "8.32.0",
|
|
75
75
|
"@wdio/repl": "8.24.12",
|
|
76
76
|
"@wdio/types": "8.32.4",
|
|
77
|
-
"@wdio/utils": "8.
|
|
77
|
+
"@wdio/utils": "8.35.0",
|
|
78
78
|
"archiver": "^7.0.0",
|
|
79
79
|
"aria-query": "^5.0.0",
|
|
80
80
|
"css-shorthand-properties": "^1.1.1",
|
|
81
81
|
"css-value": "^0.0.1",
|
|
82
|
-
"devtools-protocol": "^0.0.
|
|
82
|
+
"devtools-protocol": "^0.0.1273771",
|
|
83
83
|
"grapheme-splitter": "^1.0.2",
|
|
84
84
|
"import-meta-resolve": "^4.0.0",
|
|
85
85
|
"is-plain-obj": "^4.1.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"resq": "^1.9.1",
|
|
92
92
|
"rgb2hex": "0.2.5",
|
|
93
93
|
"serialize-error": "^11.0.1",
|
|
94
|
-
"webdriver": "8.
|
|
94
|
+
"webdriver": "8.35.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"devtools": "^8.14.0"
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"optional": true
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "d6eab1a26ca9feebcde789adacd872067b6c7b83"
|
|
105
105
|
}
|