UNPKG

webdriverio

Version:

Next-gen browser and mobile automation test framework for Node.js

28 lines (26 loc) • 1.17 kB
/** * * The `customs$$` allows you to use a custom strategy declared by using `browser.addLocatorStrategy`. * It returns a [`WebdriverIO.ElementArray`](/docs/api/browser/$$), the same list as [`$$`](/docs/api/browser/$$): * await it, or use `for await` and the async array methods before it resolves. * Read more on custom selector strategies 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('myStrategy', (selector) => { return document.querySelectorAll(selector) }) const pluginWrapper = await browser.custom$$('myStrategy', '.pluginWrapper') console.log(await pluginWrapper.length) // 4 }) * </example> * * @alias custom$$ * @param {string} strategyName * @param {*} strategyArguments * @return {WebdriverIO.ElementArray} */ export declare function custom$$(this: WebdriverIO.Browser, strategyName: string, ...strategyArguments: unknown[]): WebdriverIO.ElementArray; //# sourceMappingURL=custom$$.d.ts.map