When
Silk Test Workbench cannot record actions against an SAP control, you can record the actions with the recorder that is available in SAP and then dynamically invoke the recorded methods in a
Silk Test Workbench script. By doing so, you can replay actions against SAP controls that you cannot record.
Examples
For example, if you want to replay pressing a special control in the SAP UI, which is labeled
Test and which is a combination of a button and a list box, and selecting the sub-menu
subsub2 of the control, you can record the action with the recorder that is available in SAP. The resulting code will look like the following:
session.findById("wnd[0]/usr/cntlCONTAINER/shellcont/shell").pressContextButton "TEST"
session.findById("wnd[0]/usr/cntlCONTAINER/shellcont/shell").selectContextMenuItem "subsub2"
Now you can use the following code to dynamically invoke the methods
pressContextButton and
selectContextMenuItem in your script in
Silk Test Workbench:
.SapToolbarControl("shell ToolbarControl").Invoke("pressContextButton", "TEST")
.SapToolbarControl("shell ToolbarControl").Invoke("selectContextMenuItem", "subsub2")
Replaying this code will press the control in the SAP UI and select the sub-menu.