Skip to main content


Command Description

Set element text

Command Prototype


Parameter Description

objUiElementTruedecorator@ui""Feature string of elements
sValueTruestring""Text content to be written into the UI element. Text type is string
bContinueOnErrorNonebooleanNoneSpecify whether the automation should continue to support this field even if the activity is incorrect, it is only supported by the Boolean value (true, false) default value
iDelayAfterNonenumber300Delay time (in milliseconds) after executing the activity is 300 milliseconds
iDelayBeforeNonenumber200The delay time (in milliseconds) before any operations are executed is by default 200 milliseconds


TracePrint "--------------------Set element text--------------------" 
// --------------------------------------------------------
// [Remarks] Set the element text, the Demo needs to use IE to open the URL below
// url:
// Input parameter 1:
// objUiElement--target element
// Input parameter 2:
// sValue--write text
// Input parameter 3:
// optionArgs--optional parameters (including: error continue execution/delay after execution/delay before execution).Type:Dict

// Command prototype: UiElement.SetValue(objUiElement,sValue,optionArgs)
// --------------------------------------------------------

UiElement.SetValue(@ui"input control<input>8","",{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})