rhatwar007
rhatwar007

Reputation: 343

Function keys In UFT

  1. Version : Using HP-UFT Tool 11.53 Build 0382.
  2. Question :Wanted to automate Function key F9 for my script but I am not able to as I do for normal keyboard keys what is method to do so.
  3. Work Done : Try to Record for function key Hitting But no record is create for it.
  4. Scenario : In my application on F9 press one popup would come and I just want to test it using UFT Tool.

Upvotes: 0

Views: 2755

Answers (2)

bhavani P
bhavani P

Reputation: 62

You can use sendkeys, if you want to hit any key from keyboard. Try the below code.

Set oWscript = CreateObject("WScript.Shell")
oWscript.sendkeys"{F9}"

Upvotes: 3

Motti
Motti

Reputation: 114695

In UFT Window has a Type method, the parameter for this method is a string but there are special values for special keys. For you case you probably want micF9.

Please look and Window.Type's documentation for more details.

Upvotes: 1

Related Questions