What does the DefaultSearchTimeOut parameter do?
Does it keep trying for the webelement until it finds out with in the timeout period?
For example- If I have set Adapter.DefaultSearchTimeout = 30000
Is it going to search for element multiple times until the timeout occurs?
or
It will search only once and then wait until the timeout happens.
Pelase let me know.
Thanks,
Saha
What DefaultSearchTimeout parameter does?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: What DefaultSearchTimeout parameter does?
Hello Saha,
As the API documentation for that property points out, the default search timeout is the time Ranorex will search for an element when you assign a string to an Element/Adapter variable, e.g.:
Every time you access an element using the code generated for a repository item, an adapter is created from the RepoItemInfo class and the RepoItemInfo search timeout is used.
For both cases Find<T> or FindSingle<T> are used internally. The search timeout is provided as parameter to these functions. With the search timeout provided these functions will search through all elements repeatedly as long as the timeout has not elapsed and will stop afterwards.
If you use these functions yourself and you don't provide a timeout parameter then the element tree is searched only once.
Regards,
Roland
Ranorex Support Team
As the API documentation for that property points out, the default search timeout is the time Ranorex will search for an element when you assign a string to an Element/Adapter variable, e.g.:
Ranorex.Button button = "pathToTheButton";On the other hand, for a repository item the search timeout of the RepoItemInfo class is used.
Every time you access an element using the code generated for a repository item, an adapter is created from the RepoItemInfo class and the RepoItemInfo search timeout is used.
For both cases Find<T> or FindSingle<T> are used internally. The search timeout is provided as parameter to these functions. With the search timeout provided these functions will search through all elements repeatedly as long as the timeout has not elapsed and will stop afterwards.
If you use these functions yourself and you don't provide a timeout parameter then the element tree is searched only once.
Regards,
Roland
Ranorex Support Team
Re: What DefaultSearchTimeout parameter does?
Thanks Ronald,
I just want to make sure I understand you correctly.
I have code like this in my script
Dim element As Ranorex.WebElement = Host.Local.FindSingle(".//[email protected]="New Auto", 30000)
So I am assuming that ranorex will search for this element repeatedly for 30ms until it finds out.
Please let know if I am correct.
Thanks,
Saha
I just want to make sure I understand you correctly.
I have code like this in my script
Dim element As Ranorex.WebElement = Host.Local.FindSingle(".//[email protected]="New Auto", 30000)
So I am assuming that ranorex will search for this element repeatedly for 30ms until it finds out.
Please let know if I am correct.
Thanks,
Saha
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: What DefaultSearchTimeout parameter does?
Hi,
you are correct but Ranorex waits 30 seconds and not 30 milliseconds.
Regards,
Peter
Ranorex Team
you are correct but Ranorex waits 30 seconds and not 30 milliseconds.

Regards,
Peter
Ranorex Team
Re: What DefaultSearchTimeout parameter does?
oops you got me on that:)