How to enable/disable screenshot feature in QAF framework?

QMetry Automation Studio captures screenshots while executing the recorded Test Cases for some events such as on failure points, Assert commands, etc. The screenshots are then added to the Test Result file. Users can import the Test Results along with screenshots using the integration option. Below are the steps to enable/disable the screenshot feature.

To disable the screenshot at checkpoints in QAF:

By updating the application.properties file

Parameter Key

Default Value

Description

Parameter Key

Default Value

Description

selenium.success.screenshots

1 - Enable

Specify whether to capture screenshot or not on checkpoint success. Possible values 0 or 1, true or false.

selenium.failure.screenshots

1 - Enable

Specify whether to capture screenshot or not on checkpoint failure. Possible values 0 or 1, true or false.

  1. Open resources > application.properties file

  2. Set value 1 for the below parameters, as shown in the below screenshot:

    1. selenium.success.screenshot=0

    2. selenium.failure.screenshots=0

To disable complete screenshot storing in QAF:

By updating the POM.XML

  1. Open Pom.xml and comment below line, as shown in the below screenshot:

    1. <selenium.screenshot.dir>$\{output.dir}/img</selenium.screenshots.dir>