Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Monday, 22 April 2019

Place the Cursor at the Beginning of a Text Label (VBScript)....


'The following example uses the SetCaretPos method to place the cursor at the 
beginning of the "X" static text label and then clicks the "Blocking reason" button.
When the button is clicked, a status bar message displays the operation that was 
performed.A checkpoint on the status bar verifies that the proper operation
was performed on the label.
SAPGuiSession("Session").SAPGuiWindow("Invoice Items").SAPGuiLabel("X")_
.SetFocus
SAPGuiSession("Session").SAPGuiWindow("Invoice Items").SAPGuiLabel("X")_
.SetCaretPos 0
SAPGuiSession("Session").SAPGuiWindow("Invoice Items")_
.SAPGuiButton("Blocking reason").Click
SAPGuiSession("Session").SAPGuiWindow("Invoice Items")_
.SAPGuiStatusBar("StatusBar").Check CheckPoint("StatusBar")