01-13-2014 04:25 AM
I cannot get combo box value setting to work. I recorded simple SAPGui 7.30 in which I try to set time filter for displaying IDocs (we02), changing criteria Created At opens a dialog with 3 combos, but replay fails
Action.c(49): Warning: Could not find combobox entry by value "14"
Action.c(49): Error: Failed to select combobox entry "14"
Action.c(49): Error: Failed to find SapGui component by ID "sbar"
Action.c(49): Error: Failed to get the status bar text
const char* cmbSHL3_TIME10 = "usr/cmbSHL3_TIME-SHOUR";
Thank you for any advice in advance.
Solved! Go to Solution.
01-14-2014 11:00 PM
The error message indicates that during the replay such entry doesn't exist.
The easiest way I can think of troubleshooting the problem is as follow:
1. Put the cursor on the step
2. Replay the script using the "Record at the cursor" option to insert additional steps
3. On the point you start recording, select the option in the combobox
4. Stop the recording
5. Compare and see the steps generated
I would suspect that either the business process is a bit different when you repeat the same value or when you use different values and a logic should be added in the script level to address all scenarios.
01-15-2014 02:26 AM - edited 01-15-2014 02:32 AM
thank you for response. I tried what you suggested, but I was not successful. It recorded similar sapgui call as before, which fails during reply.
where cmbSHL3_TIME13 = "usr/cmbSHL3_TIME-SHOUR"
Action.c(58): Warning: Could not find combobox entry by value "07"
Action.c(58): Error: Failed to select combobox entry "07"
Action.c(58): Error: Failed to find SapGui component by ID "sbar"
Action.c(58): Error: Failed to get the status bar text
The dialog does not change, it is a standard time criteria dialog in SAPGui with 3 combox boxes used to specify HH:MM:SS, the combos are always populated with all possible values, and when the dialog opens, the values in those combos are preselected to match current time - and that is what I need to change.
01-15-2014 03:34 AM
As you can see the value selected int he combobox changes each time.
I would suggest you try to see if there is a function that allows you to check the possible values in the combobox from the snapshot viewer
Select alternative way to perform the operation as the additionalInfo also changes.
01-15-2014 07:18 AM - edited 01-15-2014 07:20 AM
I haven't found alternate way to set the combo value but I have found the solution.
There is an advanced runtime option "Replay using running SAPlogon application". When not set, LR launches SAPlogon application. And then when the Choose time dialog is opened, combos are not filled with all values (yet, or in this mode LR blocks application's UI event message loop or whatever??) and therefore sapgui_select_combobox_entry fails.
However when set the runtime option and I launch SAPlogon by myself, replay works just fine.