getComputedRole
Obtenir le rôle WAI-ARIA calculé d'un élément.
Utilisation
$(selector).getComputedRole()
Exemple
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"
})
Retourne
- <String>
return
: le rôle WAI-ARIA calculé