Page 1 of 1

How to debug recorded steps

Posted: Wed Feb 17, 2010 4:21 pm
by snowli
Hello,

We are still in the process of evaluating the software.

After I record some steps, when I run it on another PC. Sometimes it fails to replay on certain step. How to find which recording line breaks? Report now, the error message in report file is for cs file. But how to find the matching recording line?

I am not familiar with cs file so I don't want to debug there. From Help, it only shows how to set break points in cs file and debug.

Thanks, Snow

Re: How to debug recorded steps

Posted: Wed Feb 17, 2010 4:35 pm
by Ciege
Easiest would be to wrap your test code in a try/catch block then report the error in the catch. It will give you the line number. Do something similar to this:

Code: Select all

try
{
  ...your code here...
}
catch (RanorexException e)
{
  Report.Error(e.ToString());
}

Re: How to debug recorded steps

Posted: Tue Feb 23, 2010 7:11 pm
by Support Team
snowli wrote:Report now, the error message in report file is for cs file. But how to find the matching recording line?
The error message should contain the name of the repository item used in the action, you can use that name to find the corresponding action. Just look for a record item with the specified name in the "Item Name" column.

Did you know that you can also replay specific actions in a recording? To do that select the record items you want to replay (hold the CTRL key to select multiple items) and click right on a selected item. In the context menu select "Play Selected Item/s"!

Regards,
Alex
Ranorex Support Team