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

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
ranoman1
Posts: 4
Joined: Mon Sep 20, 2010 7:27 am

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

Post by ranoman1 » Thu Oct 28, 2010 10:33 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

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

Post by Support Team » Thu Oct 28, 2010 10:58 am

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
.
Image

ranoman1
Posts: 4
Joined: Mon Sep 20, 2010 7:27 am

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

Post by ranoman1 » Mon Nov 15, 2010 10:11 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

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

Post by Support Team » Mon Nov 15, 2010 2:47 pm

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
.
Image