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

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Source textText to make action onRobin.String
Yes
Seek stringThe string to seekRobin.String
Yes
Case sensitiveIf 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.BooleantrueNo
Results
ResultBoolean variable to which the test result will be written.Robin.Booleantrue

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

  1. Create a boolean variable to which the result of the "Check for entry" action will be written. 


  2. Move the "Check for entry" action to the workspace and set its parameters. 


  3. Move the "If" action to the workspace and set its parameter. 


  4. Add a "Show message" action to the "Truth" branch and set its parameter. 


  5. Add a "Show message" action to the "False" branch and set its parameter. 


  6. Click "Start" in the top panel to start the robot.

Result 

The text is found and the result is displayed in the dialog box 


  • Нет меток