QuestionQ109
DebuggingWhen an exception occurs while a test case is executing, it is desirable to fail the test case and capture a screenshot of the application's current state. Which of the following strategies can achieve this?
- A Surround the test case in a Try CatchAdd a Verify Expression in the Catch Exception block, configured in the following way:TakeScreenshotIfFailed: False -Expression: False
- B Surround the test case in a Try CatchAdd a Verify Expression in the Catch Exception block, configured in the following way:TakeScreenshotIfFailed: True -Expression: True
- C Surround the test case in a Try CatchAdd a Verify Expression in the Catch Exception block, configured in the following way:TakeScreenshotIfFailed: True -Expression: False
- D Surround the test case in a Try CatchAdd a Verify Expression in the Finally Exception block, configured in the following way:TakeScreenshotIfFailed: True -Expression: “1 > 2”
Community Discussion