Created
July 24, 2020 11:30
-
-
Save laojala/086249b6435990896971d2a99ab0d1a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** Settings *** | |
Documentation Saves screen recording for failing tests. | |
... iPhone: requires ffmpeg installed on Mac where phones are conneted. Run: brew install ffmpeg | |
... Android: recording is not working in all phones (does not cause test failures if recording is not supported) | |
Library BuiltIn | |
Library OperatingSystem | |
Library AppiumLibrary | |
*** Keywords *** | |
Capture Screen Recording | |
${pass} Run Keyword And Return Status Start Screen Recording | |
Run Keyword Unless ${pass} Log Could not start screen recording | |
End Screen Recording | |
Run Keyword And Ignore Error Remove Screen Recording If Pass | |
Remove Screen Recording If Pass | |
${filename} Stop Screen Recording | |
Run Keyword If Test Passed Remove File ${filename} | |
Run Keyword If Test Passed Log Screen recording not saved because test execution passed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment