27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
|
|
/**
|
||
|
|
*
|
||
|
|
* The `customs$$` allows you to use a custom strategy declared by using `browser.addLocatorStrategy`.
|
||
|
|
* Read more on custom selector stratgies in the [Selector docs](../../selectors#custom-selector-strategies).
|
||
|
|
*
|
||
|
|
* <example>
|
||
|
|
:example.js
|
||
|
|
it('should get all the plugin wrapper buttons', async () => {
|
||
|
|
await browser.url('https://webdriver.io')
|
||
|
|
await browser.addLocatorStrategy('myStrat', (selector) => {
|
||
|
|
return document.querySelectorAll(selector)
|
||
|
|
})
|
||
|
|
|
||
|
|
const pluginRowBlock = await browser.custom$('myStrat', '.pluginRowBlock')
|
||
|
|
const pluginWrapper = await pluginRowBlock.custom$$('myStrat', '.pluginWrapper')
|
||
|
|
|
||
|
|
console.log(pluginWrapper.length) // 4
|
||
|
|
})
|
||
|
|
* </example>
|
||
|
|
*
|
||
|
|
* @alias custom$$
|
||
|
|
* @param {string} strategyName
|
||
|
|
* @param {*} strategyArguments
|
||
|
|
* @return {WebdriverIO.ElementArray}
|
||
|
|
*/
|
||
|
|
export declare function custom$$(this: WebdriverIO.Element, strategyName: string, ...strategyArguments: unknown[]): Promise<WebdriverIO.ElementArray>;
|
||
|
|
//# sourceMappingURL=custom$$.d.ts.map
|