Why does this not work in QTP 8?
Get an "required-object"-error...
Set WshShell = CreateObject("WScript.Shell")
Wait 0, 500
First parameter - Seconds
Second parameter - Milliseconds
sorry it is not working...
Sleep is a method of "WScript"... and therefore I get this error with your proposal:
Object doesn't support this property or method: 'WshShell.Sleep'
WS engine is corrupted or not installed
on your machine.
Fix it and script will work. I'm sure.
>WS engine is corrupted or not installed
>on your machine.
>Fix it and script will work. I'm sure.
Sorry, but I don't think so...
I have installed WSH 5.6 on my machine. When I run the script manually on Windows (with a double click on the .VBS-file) it works perfect.
So the problem must be in QTP...
Why using the built-in Wait function instead of WScript.Sleep is not good for you?
Check if WSH is integrated with QTP in the Registry.
HKEY_Local_Machine --> Software --> MicTest --> ScriptMgr
If there Key: Mercury.VbScriptMgr under ProgID?
Dima is right.The built-in Wait function is always work...and it is simpler ...
Sunrise - Happy Testing