views:

46

answers:

2

I have installed the QTP 10.0 on a virtual Machine & trying to run a basic line of code through QTP i.e.

MsgBox "ABC"

However, when I try to execute the script on the VM, it fails at the very first line saying that:

**"The test run cannot continue due to an irrecoverable error"

Failed to run script. *Description: Invalid Syntax*

Line(1): "RunAction "Action1", oneiteration".

I have tried this installation on 4 different VM machines & failed to resolve it.

I think there is some issue with the VMware or may be the debugger is not supported.

I am using Windows 2003 R2 Enterprise Edition SP2 with MS SQL 2005 installed on the VMs.

My QTP Installation includes:

Default Add-ins

Siebel Addin

Java Addin

.Net Addin

Kindly help me out to solve this issue....

A: 

Try

MsgBox("ABC")
katmoon
In VBScript (which the language behind QTP scripts) you only need parentheses if you use the return value of the function call.
Motti
Amit Sharma
@Motti. You are right. Sometimes QTP requires parentheses when a function has more then 1 inputs, so I always confuse it.
katmoon
@Amit Sharma. I also use QTP 10 on Windows 2003 R2 Enterprise Edition SP2, and it works fine. Might it be connected with your Batch job agent?
katmoon
Amit Sharma
maybe VBscript version is different on those systems?
katmoon
A: 

The error line which you quoted:

"RunAction "Action1", oneiteration"

is called from Action0 which could be found in QTP script folder under name Action0.mts.

You could check whether this file is not corrupted and has a new line character at the end of the line.

It is also possible that you've renamed the default Action1 to something else and QTP did not update Action0 to call your renamed function.

Another problem might come from a error in function library, incorrect path to the datatable or recovery scenario.

Thanks, Maciej

Maciej Zaleski