UFT, Sendkeys and Sleep

Question ID: 107332

I have a field that I have to use Sendkeys with but it’s sending too fast, so I’m trying to slow down the data entry. This is my code:

Set WshShell = CreateObject("WScript.Shell") Browser("ATLIS").Page("Roles & Permissions").WebEdit("Search Box").Click
For i = 1 To Len(DataTable.Value("User"))
WshShell.SendKeys Mid(DataTable.Value("User"), i, 1)
WScript.Sleep 100
Set WshShell = Nothing

But I keep getting an "Object Required" error on the "WScript.Sleep" line. Can someone please tell me what I’m doing wrong? Thx!

Marked as spam
Posted by (Questions: 10, Answers: 5)
Asked on January 10, 2017 5:10 pm
Answers (1)
Private answer

Sleep requires .net 3.5 or 3.0 framework installed. Recommend using Mercury.DeviceReplay as described here.


[1]: http://eyeontesting.com/answers/12726/view.html

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on January 10, 2017 5:19 pm