DefaultSearchTimeout : General Questions

DefaultSearchTimeout

Ask general questions here.

DefaultSearchTimeout

Postby sdaly » Tue May 18, 2010 9:57 am

Hi

I have set adapter.DefaultSearchTimeout = 10000 in the main class.

I am then searching for the following which is a search result after a search button is clicked. The result is returned within 2 seconds, however I get a Ranorex.ElementNotFoundException: No element found for path error, unless I put a delay in such as delay.seconds(4)

Dim selector As Ranorex.ATag = host.Local.FindSingle("/dom[@caption='Central Vision']/frameset/frameset/frame[@id='main']/frameset/frame[@name='search_display']/body/div[@id='pat_details_layer']/table/tbody/tr/td/table/tbody/tr/td[@innertext='" & surname & "']/../../../../../td[@innertext='" & forename & "']/../td/table/tbody/tr/td/a[@innertext='" & chi & "']")

selector.Click

Am I using the defaultSearchTimeout in the wrong way? Preferable I wouold like to remove all delays so the tests can run most efficiently...

Thanks
Scott
User avatar
sdaly
 
Posts: 213
Joined: Mon May 10, 2010 12:04 pm
Location: Dundee, Scotland

Re: DefaultSearchTimeout

Postby sdaly » Tue May 18, 2010 11:18 am

Ahhh, just read a thread which tells me the findSingle method does not use the timeout by default! I've now passed the timeout in and it works without the delays!

This now works!

Dim selector As Ranorex.ATag = host.Local.FindSingle("/dom[@caption='Central Vision']/frameset/frameset/frame[@id='main']/frameset/frame[@name='search_display']/body/div[@id='pat_details_layer']/table/tbody/tr/td/table/tbody/tr/td[@innertext='" & surname & "']/../../../../../td[@innertext='" & forename & "']/../td/table/tbody/tr/td/a[@innertext='" & chi & "']", Adapter.DefaultSearchTimeout)
selector.Click
User avatar
sdaly
 
Posts: 213
Joined: Mon May 10, 2010 12:04 pm
Location: Dundee, Scotland

Re: DefaultSearchTimeout

Postby Support Team » Tue May 18, 2010 11:29 am

Hi!

Nice to hear that it works now.
Here are two documentation links about this issue
http://www.ranorex.com/support/user-gui ... html#c2480
http://www.ranorex.com/Documentation/Ra ... imeout.htm

Regards,
Peter
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4840
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to General Questions

Who is online

Users browsing this forum: No registered users and 0 guests