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 | Any |
Example
it('should get all the plugin wrapper buttons', () => {
browser.url('https://webdriver.io')
browser.addLocatorStrategy('myStrat', (selector) => {
return document.querySelectorAll(selector)
})
const pluginWrapper = browser.custom$$('myStrat', '.pluginWrapper')
console.log(pluginWrapper.length) // 4
})