custom$$
The customs$$
allows you to use a custom strategy declared by using browser.addLocatorStrategy
Usage
browser.custom$$(strategyName, strategyArguments)
Parameters
Name | Type | Details |
---|---|---|
strategyName | string | |
strategyArguments | param |
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 pluginWrapper = await browser.custom$$('myStrat', '.pluginWrapper')
console.log(await pluginWrapper.length) // 4
})