custom$$
customs$$
கட்டளை browser.addLocatorStrategy
பயன்படுத்தி அறிவிக்கப்பட்ட தனிப்பயன் உத்தியைப் பயன்படுத்த உங்களை அனுமதிக்கிறது.
தனிப்பயன் தேர்வி உத்திகள் பற்றி தேர்வி ஆவணங்களில் மேலும் படிக்கவும்.
பயன்பாடு
$(selector).custom$$(strategyName, strategyArguments)
அளவுருக்கள்
பெயர் | வகை | விவரங்கள் |
---|---|---|
strategyName | string | |
strategyArguments | * |
எடுத்துக்காட்டு
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
})
திரும்பும் மதிப்பு
- <WebdriverIO.ElementArray>