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