Page 1 of 1

How to increase the search time in code for getting the path

Posted: Thu Oct 28, 2010 10:33 am
by ranoman1
Am using Getpath() to get the Path of the object, but what happens is,

It is searching for the default time of 10 seconds and is failing to get the path,

But am sure that, increasing the time will help it to get the path, how to do that in code?

Regards,
Ranoman1

Re: How to increase the search time in code for getting the path

Posted: Thu Oct 28, 2010 10:58 am
by Support Team
The Adapter.GetPath method does not use any timeout. It should always return you the RxPath for that element, no matter how long it takes to calculate the RanoreXPath.

Could you post the code you use?

Regards,
Alex
Ranorex Team

Re: How to increase the search time in code for getting the path

Posted: Mon Nov 15, 2010 10:11 am
by ranoman1
Hi,

Am using the following code,

Ranorex.Row subrow= row.Children[ii].GetPath().ToString();
if(subrow.Cells[2].Text.ToLower()!="n/a" && ubrow.Cells[2].Text.ToLower()!="")
{
sourcablesubrowarraylist.Add(row.Children[ii].GetPath().ToString());
}


But am getting the following error at the end,

Ranorex.ElementNotFoundException: No element found for path '/form[@controlname='frmMDIMain']/element[@controltypename='MdiClient']/form/element/container[@controlname='tbpEstimatePage']/element[@controlname='grdLineItems']/table/row[@accessiblename='Band 0 row 1']/row[@accessiblename='Band 1 row 1']' within 10s.

Kindly clarify?

Regards,
Ranoman1

Re: How to increase the search time in code for getting the path

Posted: Mon Nov 15, 2010 2:47 pm
by Support Team
Hi,

You get this error because Ranorex is not able to find the element. Please check if the RxPath you are using is correct and available during the actions.

Regards,
Peter
Ranorex Team