Hi,
When I try to exit my test application, I keep getting an error. The application closes fine and the rest of the scripts continue, but the error always get logged.
The error I see getting logged is:
Action 'close' failed on element '{Form:MainWindow}. Failed to get response from control within 2000 milliseconds.
I assume that Ranorex is waiting for a response from the application that it closed? Perhaps it closes too quickly to send a response, but how do I stop Ranorex from waiting for a response so that I don't get this error when the application exited successfully?
I've tried to exit the application the following 3 ways, but keep getting this error:
Method 1:
------------
repo.ReporterForm.Self.Close();
Method 2:
------------
Ranorex.Form repForm = repo.ReporterForm.Self;
repForm.Close();
Method 3:
------------
Ranorex.MenuItem mi = "/form[@controlname='MainWindow']/menubar/menuitem[@accessiblename='Report']";
Host.Local.CloseApplication(mi);
Thanks!
CloseApplication and Form.Close gives response error
Re: CloseApplication and Form.Close gives response error
What version of Ranorex are you using? I've had these messages in the past but newer versions of Ranorex have (mostly) mitigated them.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: CloseApplication and Form.Close gives response error
Hi,
As Ciege said, this should be fixed with newer Version of Ranorex. Which version do you use?
Regards,
Peter
Ranorex Team
As Ciege said, this should be fixed with newer Version of Ranorex. Which version do you use?
Regards,
Peter
Ranorex Team
Re: CloseApplication and Form.Close gives response error
I'm using version 3.1.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: CloseApplication and Form.Close gives response error
Hi,
Sorry but you have to capture this exception by your own. This exception is thrown if your application needs longer than 2 seconds to close. If this is the cause, Ranorex throws an exception because we wait 2 seconds for a respond of you app.
Regards,
Peter
Ranorex Team
Sorry but you have to capture this exception by your own. This exception is thrown if your application needs longer than 2 seconds to close. If this is the cause, Ranorex throws an exception because we wait 2 seconds for a respond of you app.
Regards,
Peter
Ranorex Team