Check for entry Version 5 (Java)
Action group: Text
Description
Checks if the specified text is present in the source text
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Source text | Text to make action on | Robin.String | Yes | |
Seek string | The string to seek | Robin.String | Yes | |
Case sensitive | If the value is True, then the case will be taken into account when searching for matches, otherwise it will not be. The default is «false». | 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 variable "Input text" with the text "Ira Ivanova, Masha Smirnova, Olya Petrova". It is required to check the text in the variable for the content of the terms "Olya Petrova", write the result to the variable and display the corresponding message in the dialog box (Match found, match not found).
Solution
Use the "Check for entry", "If", "Show message" actions.
Implementation
- Create a boolean variable to which the result of the "Check for entry" 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 found and the result is displayed in the dialog box
Обзор
Инструменты контента