state()
state(
el):IControlState|null
Defined in: js-api/src/u2core/inspect.ts:46
JSON-safe state of the control owning el — what page.evaluate hands to a test runner; null
outside a u2 control. Synchronous and side-effect free.
Parameters
| Parameter | Type |
|---|---|
el | Element | null |
Returns
IControlState | null
Example
const {label, value, valid, enabled} = DG.U2.state(el)!;