Screenshots generation is organized automatically for selenium tests via IScreenshotRule.java implementation(s). You can implement and register any custom rules based on your requirements.
Default AutoScreenshotRule.java depends on 2 configuration parameters:
Example of the extended screenshot rule can be found here
auto_screenshot enabled Carina capture screenshots after every important actions: click, type, page opening and of cause after driver and test failures.
allow_fullsize_screenshot you can enable full size screenshoting for driver and test failures. Make sure to test its enabling in advance on your webapp.
Huge pages concatenation might significantly slow down your tests execution.
Default timeout for capturing visible screen is
EXPLICIT_TIMEOUT/3 and for fullsize screenshoting
To disable completely automatic screenshots capturing clear all rules:
To capture screenshot explcitly from test code use:
Screenshot.capture(getDriver(), "my page screenshot"); Screenshot.capture(getDriver(), "Captureg full size screenshot", true);
How can I find all places where automatic screenshot capturing is performed?