Page 1 of 1

what's DefaultUseEnsureVisible for?

Posted: Wed Jul 01, 2009 2:10 am
by marcushe
Environment: Ranorex2.1
1. Adapter.DefaultUseEnsureVisible will be applied to only all recorded objects or my created adapter objects in codes?
2. In projects ,EnsureVisible property is set to Default. So, what's default??default=true?default=false?default=null??
3. In projects. Search Timeout property is set to 3 seconds, but i don't feel 3 seconds is taken to measure whether a object occurs. It's so hasty , seem only 1 second or 1 time is consumed.

Re: what's DefaultUseEnsureVisible for?

Posted: Wed Jul 01, 2009 1:39 pm
by Support Team
ad 1 and 2) For each adapter instance and repository item, respectively, you can set whether to use the EnsureVisible method when invoking mouse actions on them. If you set UseEnsureVisible to true, the Adapter.EnsureVisible method will be called trying to bring the corresponding element to the foreground. If you set UseEnsureVisible to Default, the values set to Adapter.DefaultUseEnsureVisible is used to determine whether to invoke EnsureVisible. The bad thing now is that currently you can set the Adapter.DefaultUseEnsureVisible value only in code, but we will add a configuration parameter that you can set via the configuration dialog in the Ranorex Recorder for the next release.

ad 3) The SearchTimeout property of a repository item specifies the maximum time to search for the element corresponding to the specified path. If the element is found right away, this timeout does not affect the replay time. If you want an action to take a specified time, set its Duration property. See this post for setting the Duration http://www.ranorex.com/forum/change-delay-t901.html or http://www.ranorex.com/support/user-gui ... iming.html for an introduction to the Ranorex Recorder timings.

Regards,
Alex
Ranorex Support Team

Re: what's DefaultUseEnsureVisible for?

Posted: Thu Jul 02, 2009 9:12 am
by marcushe
Thanks ,i have another question.
responding to DefaultEnsureVisible property, does adapter.DefaultSearchTimeOut affect all repositry items and instances??

Re: what's DefaultUseEnsureVisible for?

Posted: Fri Jul 03, 2009 9:48 am
by Support Team
The Adapter.DefaultSearchTimeout does not affect repository items, since they have a SearchTimeout parameter themselves, and does not affect instances either, because if you already have instances there's no need to search it again :-)

The Adapter.DefautlSearchTimeout is used when you search for an element by assigning a path directly to an adapter instance (as stated in the API documentation for that property: http://www.ranorex.com/Documentation/Ra ... imeout.htm). You can't specify a timeout when using the direct assigning, so the Adapter.DefaultSearchTimeout is used:
Button button = "pathToMyButton";
Regards,
Alex
Ranorex Support Team