| || |
hi every body when ever i use "wscript.echo" an error message is prompted as"the test can not run due to unrecoverable error object required wscript" how to solve this problem
WScript.echo should not be used in QTP. It is pure VBScript statement which is available only when you use CSCript or WScript to run your script. For QTP use the print method
Print "This is a test"
It isn't just that wscript.echo should'nt be used, it can't be used because the QTP runtime environment does not create the wscript object. And there is not way to instantiate the wscript object in QTP, which is only supported (implicitly) in the WSH runtime environment. Therefore other wcript functions, like wscript.sleep, can't be used either.
Note that this issue has been discussed many times on this forum, and you would have found the answer had you searched this forum. Please try that next time before posting.
But as Tarun has pointed out, the QTP runtime environment has equivalent (not always intuitively obvious) functions.