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
DefaultSearchTimeout
Re: DefaultSearchTimeout
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
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
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: DefaultSearchTimeout
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
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