Set text

This activity allows you to set values in a specific field within a desktop-based
application during runtime.

Technical Reference

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Input

Action_by: This parameter helps you trigger the action that needs to be performed. It has two options:

 

Native: Once the action is captured in the spy window, it is executed in the background of the code.

Human: Once the element is found, the trigger's action will be performed as per the 'Human' option.
Paste: This allows you to paste the specified value.

By default, 'Native' will be chosen.

ClearAndType: When this box is checked the bot clears the existing data in the application and types the given text.
By default, this option will be un-checked.

DelayAfter: It assists the user to add a delay before initiating subsequent activities.

The delay duration here is in milliseconds. By default, it is set to "300" milliseconds.
When the option is left blank, the delay will not be considered.

DelayBefore: It assists the user in adding a delay before starting the execution of the activities.

The delay duration here is in milliseconds. By default, it is set to "300" milliseconds.
When the option is left blank, the delay will not be considered.

Execute_by: Gets auto-filled once the "Active Application" is selected. This contains the set of attributes for the specific spied element.

Text: Specify the text to be passed or set in the specified element. It accepts the 'String' data type

WaitTime: It enables the user to introduce a delay before initiating subsequent activities. The delay is specified in milliseconds.

 

By default, it is set to 10000 milliseconds. Leaving the option blank will result in no delay being applied.

 

Misc

 

DisplayName: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.

SkipOnError: Specify the "Boolean" value as "True" or "False."

 

True: Continue executing the workflow regardless of any errors thrown.

False: Halt the workflow if it encounters any errors.

None: If the option is left blank, the activity will, by default, behave as if "False" were chosen.

Version: It indicates the version of the feature being used.

Output

Result: It provides the ability to view the execution status of the activity. It returns values in "Boolean."

 

True: Indicates that the activity has been executed successfully without any errors.

False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.

Represents mandatory fields to execute the workflow

Here's an example of how the SetText' function works in the workflow –

The following is a simple example that demonstrates how to set the text in a
“Notepad” application.

1.       Drag and drop the "SetText" activity onto the designer pane and set it as the
“Start Node.”

a.       Double-click the activity.

b.       Here we are choosing the "Select Element" option.

c.       Click here to know “Link from Reusable Objects.”

d.       Select the element where we need to pass/set the value. Here, I am selecting
the element from the 'Notepad' app.

e.       Once you have chosen the "Element," the attributes will be stored in the
"Spy" window, along with an "image" of the element.

f.        If you wish to add or remove any attributes, you can edit the "Attributes
Editor." In this case, we are not making any changes in the “Editor.”

g.       Once you click on the "Save" button, the elements will be stored in the
activity window.

h.       Set the value to be entered in the specified element under the "Text"
parameter. Here, I am setting the value as "How was your day!" in the
Notepad application.

i.      You can either hardcode the value or retrieve it from a variable.

ii.      To retrieve a value from a variable, simply update the value in the "Text"
parameter that has been declared. Here I am using Value.

2.       Execute the workflow to view the output.