ApplesauceOS
Read Markdown ↗Download .md

Element.getAttributes

Read fresh element attributes.

js
element.getAttributes()

Arguments

No arguments.

Returns

Object containing identifier, type, className, label, text, value, rect and state flags.

Example

js
const element = UIHelper.waitForElement({id: "target", visible: true, enabled: true}, 5000);
console.log(element.getAttributes());

Notes

Stale elements throw; reacquire after navigation. Read several fields with getAttributes() in one call.

All JavaScript APIs · Automation playbook