Skip to main content

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

ParameterTypeDescription
ctxContextContext object.
selectorstringElement selector.
propertyNamestringThe property to be set.
valuestringThe value to set the property to.
optionsWaitForSelectorOptions(Optional)

Returns:

Promise<void>

Example

await setProperty(ctx, '#my-selector', 'disabled', 'true');