Page 1 of 1

FindSingle not finding an InputTag on a webform

Posted: Wed Mar 11, 2009 12:41 am
by Ciege
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...

Posted: Wed Mar 11, 2009 9:29 am
by Support Team
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

Posted: Wed Mar 11, 2009 4:12 pm
by Ciege
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!