sdk.automation.setproperty
Home > @matterway/sdk > Automation > setProperty
Automation.setProperty() function
Changes the value of an element property.
Signature:
export declare function setProperty(ctx: Context, selector: string, propertyName: string, value: string, options?: WaitForSelectorOptions): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object. |
selector | string | Element selector. |
propertyName | string | The property to be set. |
value | string | The value to set the property to. |
options | WaitForSelectorOptions | (Optional) |
Returns:
Promise<void>
Example
await setProperty(ctx, '#my-selector', 'disabled', 'true');