முக்கிய உள்ளடக்கத்திற்குச் செல்லவும்

getComputedRole

ஒரு உறுப்பின் கணக்கிடப்பட்ட WAI-ARIA லேபிளைப் பெறுதல்.

பயன்பாடு
$(selector).getComputedRole()
எடுத்துக்காட்டு
getComputedRole.js
it('should demonstrate the getComputedRole command', async () => {
await browser.url('https://www.google.com/ncr')
const elem = await $('*[name="q"]');
console.log(await elem.getComputedRole()); // outputs: "combobox"
})
திருப்பும் மதிப்பு
  • <String> return: கணக்கிடப்பட்ட WAI-ARIA லேபிள்

Welcome! How can I help?

WebdriverIO AI Copilot