WScript echo is not working in UFT

1.4k Views Asked by At

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

There are 1 best solutions below

2
On

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")