Vai al contenuto principale

getComputedLabel

Ottieni l'etichetta WAI-ARIA calcolata di un elemento.

Utilizzo
$(selector).getComputedLabel()
Esempio
getComputedLabel.js
it('should demonstrate the getComputedLabel command', async () => {
await browser.url('https://www.google.com/ncr')
const elem = await $('*[name="q"]');
console.log(await elem.getComputedLabel()); // outputs: "Search"
})
Restituisce
  • <String> return: l'etichetta WAI-ARIA calcolata

Welcome! How can I help?

WebdriverIO AI Copilot