CHEGUI ( <command interface> , <target system> ).
The CHEGUI command compares the value of GUI elements at runtime with the recorded values or with the values or parameters that have been entered in the command interface. You can use =, <, >, <=, >=, or <> for comparison operators. If the comparison fails, the script fails.
There are two ways of entering a CHEGUI command:
· During the recording of a transaction.
· Using the pattern function. In this case, you need at least one other GUI session open at the relevant screen.
The internal ABAP format is used for the eCATT check value. User settings and field lengths in the GUI can cause problems – for example, when commas separate thousands in numeric values. We recommend for values such as decimals or currencies that you use GETGUI (to assign the value to a numeric parameter) in combination with CHEVAR, since both these commands use the internal ABAP format.
1. Record as normal using SAPGUI (Record) or SAPGUI (Attach).
2. In the Recording Running dialog box of the eCATT session, choose Insert CHEGUI Command.
The recorded session is now in SPY mode, meaning that when you position the mouse on a control, the control is highlighted.
3. In the recorded session, single-click the relevant field.
4. In the eCATT session, the dialog Selection of Properties and Methods to be Recorded appears.
5. Expand the Checks node and select what is to be recorded.
6. Choose Insert and Exit.
7. Continue with the normal SAPGUI recording.
1. In a second session, go to the desired screen.
2. In the test script editor in the eCATT session, choose Pattern.
3. In the dialog box, choose UI Control, CHEGUI, and enter a name for the command interface.
4. Change to the other session and move the mouse until the desired GUI element is highlighted.
5. Click on the GUI element.
6. In the dialog box Selection of Properties and methods to be Recorded, expand the Checks node and select what is to be recorded.
7. Choose Insert and Exit.
After the command is entered in the test script, make sure that the ConnectionId and SessionId are appropriate – they should be the same as those in the relevant SAPGUI command.