Ask general questions here.
- Posts: 6
- Joined: Wed Jul 12, 2017 11:25 am
I found from one of the posts in the forum that to close an application, the code
Code: Select all
But in my application I've a validation done by a message box with Message
Do you want to close the application
with Yes and No buttons.
The code module does not perform the actions coded for the clicking of Yes or No button.
Request your help on that.
Last edited by karthikprs
on Fri Sep 01, 2017 8:27 am, edited 1 time in total.
- Site Admin
- Posts: 11709
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Since Ranorex detects your application did not fully close as expected with the CloseApplication method, it throws an exception and fails your test. To bypass this, throw the CloseApplication line in a try/catch block. When it fails (due to the popup), let it continue to your code clicking the 'Yes' button and continue your test.
I hope this helps!