02-03-2009, 07:05 PM
Here is the answer why u r getting the error:
It represents the state of a WSH process(When you click on your vbs file the WSH process starts).The whole point of the WScript object is that it represents everything about the presently running Windows Script Host
The WScript object exposes various properties about the running script and the WSH environment. Now If we run a QTP test, its run in some QTP host but not WSH.
So how can we expect the Wscript Object to be used without a WSH process Actually running.
It represents the state of a WSH process(When you click on your vbs file the WSH process starts).The whole point of the WScript object is that it represents everything about the presently running Windows Script Host
The WScript object exposes various properties about the running script and the WSH environment. Now If we run a QTP test, its run in some QTP host but not WSH.
So how can we expect the Wscript Object to be used without a WSH process Actually running.