मुख्य सामग्री पर जाएं

गणना किया गया भूमिका प्राप्त करना

किसी तत्व का गणना किया गया 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