Hi,
I want to set 1 seconds search time out for one particular action (only for this action).
I have provided 1 sin Search time out. But the Effective time out is still 31s which is not editable. So the execution still waits for 31s.
How can I change this 31 s to just 1 sec only for this particular action?
Optimize Search Timeout for 1 action
Optimize Search Timeout for 1 action
You do not have the required permissions to view the files attached to this post.
Re: Optimize Search Timeout for 1 action
Hi,
The only way how to change Effective timeout of an element is to change Search timeout of all parent elements. So in your case, you must change also Search timeout of parent element (probably root element) in which is placed the element you want to change.
Anyway, changing search timeout of repo elements is not a very good idea. Could you please explain in more details what exactly you trying to achieve? If you simply want to eliminate a search delay, in case an element does not exists, you should rather convert the action to user code and add if (element.Exists(timeout)) condition, in which you can perform (or ignore) given action.
The only way how to change Effective timeout of an element is to change Search timeout of all parent elements. So in your case, you must change also Search timeout of parent element (probably root element) in which is placed the element you want to change.
Anyway, changing search timeout of repo elements is not a very good idea. Could you please explain in more details what exactly you trying to achieve? If you simply want to eliminate a search delay, in case an element does not exists, you should rather convert the action to user code and add if (element.Exists(timeout)) condition, in which you can perform (or ignore) given action.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Optimize Search Timeout for 1 action
Hi Yes,
I have 1 recording with 10 actions. While execution some times a pop up comes in between which is dynamic. If it is coming I can click and that is working fine. But if it is not coming I don't want the execution to wait for 30 seconds.
I have 1 recording with 10 actions. While execution some times a pop up comes in between which is dynamic. If it is coming I can click and that is working fine. But if it is not coming I don't want the execution to wait for 30 seconds.
Re: Optimize Search Timeout for 1 action
Exactly what I've expected. Basically, you have two options. Either implement the solution I suggested in previous post. Or you can implement popoup watcher, from Ranorex Automation Helpers, which can watch for the appearance of of popup and click it in case it appears. If I were you and the popoup appears always at the same place of test, just randomly, I would implement the first solution.
Here is a pseudo code you may try to implement as a user code action:
Here is a pseudo code you may try to implement as a user code action:
Code: Select all
public void WaitAndClick(RepoItemInfo elementInfo)
{
if (elementInfo.Exists(1000))
{
elementInfo.CreateAdapter<Ranorex.Unknown>(false).Click();
}
}
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Optimize Search Timeout for 1 action
The code worked. Thank you.
One more doubt, if I change the search time out of the parent control, will it reflect the same for all controls?
One more doubt, if I change the search time out of the parent control, will it reflect the same for all controls?