Test Automation Framework Exception Handling

Hi Team,

Trying for a basic flow understanding using test automation framework.
Just invoking a xaml (inside RunTest sequence) which opens a web page. I wanted to capture the exception in catch block when the opened page does not exist.
To open the web page using(Use Browser Chrome) activity. In debug more once the page is opened i manually closing the web page. In catch block capturing using IOException(correct me if i am wrong) but exception is not capture for this scenario. Need some suggestions on this.
RunTest sequence - contains Given, When, Then

you should use system.exception in catch block

If you are not sure about the type of exception the activity is generating - You can always use the System.Exception which will capture all the errors.

To get the details of the error - use any of the below option. Exception.ToString will have more details

Yes mentioned System.exception in catch block, mentioned a message box also. Looks like its not entering the catch block not getting the message box.

If you are opening only the browser in an xaml file and then closing it manually, the activity has completed its purpose. You can put other activities in the body of the open browser, such as typing or clicking, and then try to close the browser it should give an error