How to record videos and taking screenshots for failed tests

Hi @hager_yousri,

Most of the libraries that interact with GUI’s will have a screenshot keyword.

e.g. for Browser Library it’s Take Screenshot and this is triggered by default on failure but can be changed with Register Keyword To Run On Failure

If you have a library that doesn’t have a screenshot function, then you could import SikuliLibrary and use Capture Screen or ImageHorizonLibrary and use Take A Screenshot both of which will capture everything on the screen at the os level

Another option is to use Run Process or Run to call an external command line screen shot program or shell script

As for taking a recording of the test, there’s nothing built in that I know of but if you have a command line screen recorder you can use the method above to run a start recording and a stop recording command. you can include the start recording and stop recording commands in the one of the Startup/Teardown keywords ( Test setup and teardown or Suite setup and teardown)

There may be more information in these threads:

Hope that helps,

Dave.