How to debug recorded steps

Ask general questions here.
snowli
Posts: 6
Joined: Mon Jan 18, 2010 9:41 pm

How to debug recorded steps

Post by snowli » Wed Feb 17, 2010 4:21 pm

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
Last edited by snowli on Wed Feb 17, 2010 7:22 pm, edited 1 time in total.

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: How to debug recorded steps

Post by Ciege » Wed Feb 17, 2010 4:35 pm

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());
}
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to debug recorded steps

Post by Support Team » Tue Feb 23, 2010 7:11 pm

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