I need to select first 3 rows SAPGuiGrid. Manually using Ctrl and selecting 3 rows at a time. I need to use UFt
Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
If an answer to your question is correct, click on "Verify Answer" under the "More" button. The answer will now appear with a checkmark. Please be sure to always mark answers that resolve your issue as verified. Your fellow Community members will appreciate it!  Learn more
I need to select first 3 rows SAPGuiGrid. Manually using Ctrl and selecting 3 rows at a time. I need to use UFt
you may use DeviceReplay object to simulate a key press.
DeviceReplay Object (microfocus.com)
thanks.
Set objDeviceReplay = CreateObject("Mercury.DeviceReplay")
SAPGuiGrid("GridViewCtrl").SelectRow 1
Setting.WebPackage("ReplayType") = 2
wait 5
objDeviceReplay.KeyDown CRTL_KEY
SAPGuiGrid("GridViewCtrl").SelectRow 2
Setting.WebPackage("ReplayType") = 2
wait 5
objDeviceReplay.KeyDown CRTL_KEY
SAPGuiGrid("GridViewCtrl").SelectRow 3
wait 5
objDeviceReplay.KeyDown CRTL_KEY
I tried with above logic. but not working. can you help on this
Setting.WebPackage("ReplayType") = 2
Set objDeviceReplay = CreateObject("Mercury.DeviceReplay")
SAPGuiGrid("GridViewCtrl").SelectRow 1
wait 5
objDeviceReplay.KeyDown CRTL_KEY
SAPGuiGrid("GridViewCtrl").SelectRow 2
wait 5
SAPGuiGrid("GridViewCtrl").SelectRow 3
wait 5
objDeviceReplay.KeyUp CRTL_KEY
try this.
James