CloseApplication and Form.Close gives response error
Posted: Wed Oct 19, 2011 6:47 pm
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!
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!