FindSingle not finding an InputTag on a webform

Ask general questions here.
User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

FindSingle not finding an InputTag on a webform

Post by Ciege » Wed Mar 11, 2009 12:41 am

Please see if you can find the issue here.

This code searches for an inputTag with a specific ID on the webDocument.

Code: Select all

PushButtonname = "btnShowVS";
DOMPushButton = webDocumentName.FindSingle(".//input[@Id='" + PushButtonName + "']");
It works on one webDocument with a different inputTag (that doesn't live so buried in a table), but is failing on this one.

Here is the RanorexPath to that inputTag I am searching for:

Code: Select all

/dom[@caption~'^Hard\ Dollar\ ::\ Resource\ C' and @pageurl='http://localhost/resourcecoordination/MainPage.aspx']/body/form/div[@id='buttons']/*/*/tr[2]/td[@innertext='Current View:    ']/input
In RanorexSpy the Webelement shows as:
Class: CmdBtn
Id: btnShowVS
TagName: INPUT

I am getting the error:
Ranorex.ElementNotFoundException: No element found for path './/input[@id='btnShowVS']'.


Thanks...

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

Post by Support Team » Wed Mar 11, 2009 9:29 am

Do you use the latest Ranorex version 2.0.1? Version 2.0.0 had a bug that the Adapter.DefaultSearchTimeout was used when no timeout was explicitly specified in Find methods.

Please, try to use a long timeout for that FindSingle method call!

Regards,
Alex
Ranorex Support Team

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

Post by Ciege » Wed Mar 11, 2009 4:12 pm

Brilliant, that was it.

I am still using 2.0.0 at the moment. I need to get to a point where I can clean up my test machine before I can update to the new version (2.0.1).

Thank you guy, again!