Check for equality Version 5 (Java)
Action group: Text
Description
Checks specified text samples for matches
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Text 1 | Text to be compared | Robin.String | Yes | |
Text 2 | Text to compare with | Robin.String | Yes | |
Case Sensitive | Boolean variable, optional. If the value of the variable is True, it will be case sensitive. False by default. | Robin.Boolean | true | No |
Results | ||||
Result | Boolean variable to which the test result will be written | Robin.Boolean | true |
Special conditions of use
None.
Example of use
Task
There is a text variable "Input text" with value = Left mouse click, text variable "Text for comparison" with value = Left mouse click. It is necessary to check case-insensitive texts for equality. Output a message in the dialog box: if the texts match - "values match", if they do not match - "values do not match".
Solution
Use the "Check for equality", "If" "Show message" actions.
Implementation
- Create a boolean variable to which the result of the "Check for equality" action will be written.
- Move the "Check for entry" action to the workspace and set its parameters.
- Move the "If" action to the workspace and set its parameter.
- Add a "Show message" action to the "Truth" branch and set its parameter.
- Add a "Show message" action to the "False" branch and set its parameter.
- Click "Start" in the top panel to start the robot.
Result
The text is checked for equality and the result is displayed in a dialog box.
Обзор
Инструменты контента