Set or Append text with text box
- Zuletzt aktualisiert2020/05/09
Set or Append text with text box
If the Set Text or Append Text action does not work in the Object Cloning command with the text box, use the workaround to perform the action.
Before you start
Before performing the workaround, ensure that the application is opened in maximize mode.Workaround
To set or append a text in the text box that already has a value, perform the
following steps:
- Capture the text box on which you want to set the text by using the Object Cloning command.
- Get the Name using the Get Property option of the captured text from the text box and store it in a variable.
- Perform the following actions using the
String Operation
command on the stored
text.
- Trim to remove space at the beginning and the end.
- Find the length of the text and store it in a variable.
- Create a value type empty variable, for example, $CLEARTEXT$ and use the IF/ELSE command to run a loop based on the length of the string.
- Assign the $CLEARTEXT$ variable with the backspace using the Variable Operation command.
- Use the
Object Cloning
command to set the text
in the text box:
- Allocate the $CLEARTEXT$ variable in the Text to Set field.
- Configure a Delay.
- Set a text again on the captured control with a new value.