1
votes

I am trying to use WScript in QTP action. But I am getting error as WScript object required.

Example : WScript.echo("ICHO") is not working in UFT. The same is working if I run using .js or .vbs file.

1

1 Answers

2
votes

In vbscript files (or js files) executed under the native windows scripting engine there is an WScript object, but this object is not part of the language, it is exposed by the host executable (cscript.exe or wscript.exe) that has instantiated the language engine.

As you are not using any of those hosts, you don't have the WScript object available.

Try with

Print("ICHO")