Can not get UFT to press a funtion key
Question ID: 107018
2
0

I am having a problem trying to press the function key F12 in our AUT. Here’s the code that I.m trying to use for pressing F12.

Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{F12}"

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on July 29, 2016 9:12 pm
183 views
Answers (1)
2
Private answer

Try using DeviceReplay instead:

Set DeviceReplay = CreateObject(''Mercury.DeviceReplay'')
Window(''Notepad'').Activate 'Activate YOUR AUT instead of Notepad.
DeviceReplay.PressKey 88
Set DeviceReplay = Nothing

You can find more information about this at these links:

https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/KM178207
https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/KM184330
https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/KM1194127

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on July 29, 2016 9:12 pm
0
That worked perfectly. Thanks!
( at July 29, 2016 9:14 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top