After using close() from class Form, i get an InvalidOperationException. But the form is closed after four seconds.
It seems that the response need to much time. Is it possible to increase this time?
System.InvalidOperationException: Failed to get response from control within 2000 milliseconds.
at Ranorex.Plugin.WinFormsFlavorElement.InvokeMethod(BindingFlags flags, String name, Object[] args)
at Ranorex.Plugin.WinFormsFlavorElement.InvokeAction(Element element, String name, Object[] args)
at Ranorex.Core.Element.InvokeAction(String name, Object[] args)
Regards
Christian
InvalidOperationException after Form.Close()
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: InvalidOperationException after Form.Close()
Hi,
in current version of Ranorex this timeout is not changable.
So you have to catch this exception by your own.
In the next major release 3.0 of Ranorex, which will be released soon, this timeout can be set by the user.
Kine regards,
Tobias
Support Team
in current version of Ranorex this timeout is not changable.
So you have to catch this exception by your own.
In the next major release 3.0 of Ranorex, which will be released soon, this timeout can be set by the user.
Kine regards,
Tobias
Support Team
Re: InvalidOperationException after Form.Close()
Fine.
Thanks for your answer.
Thanks for your answer.
Re: InvalidOperationException after Form.Close()
I'm using Ranorex 3.2 - how can I change that configuration value?
My test is failing because application need more time to close
-re
Pavlo
My test is failing because application need more time to close
-re
Pavlo
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: InvalidOperationException after Form.Close()
The Control.InvokeMethod method provides a timeout argument. You can use this method to call the "Close" method on the respective form:
Alex
Ranorex Team
Form form = ...; // your form from the repository Control control = new Control(form); control.InvokeMethod( System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, "Close", new object[] { }, 10000); // the timeout for this method in millisecondsRegards,
Alex
Ranorex Team