This is a Robot Framework library. Using this library we can do screenshots comparison which is an essential part of visual testing using Robot Framework.
Keyword | Description |
---|---|
compare screenshots |
This is the main keyword which actually does a comparison, this keyword takes three arguments path_to_baseline_screenshots, path_to_compare_screenshots and path_to_save_differencefound_screenshots |
create report |
This keyword creates a text file report of the comparison, like how many screenshots have differences, this keyword takes three arguments path_to_baseline_screenshots, path_to_compare_screenshots, and path_to_save_differencefound_screenshots |
move all difference found screenshots |
This keyword will move all the difference found screenshots from path_to_compare_screenshots To path_to_baseline_screenshots |
- Download 'compare-screenshots.py' from this repository.
- Download 'Requirements.txt' and install all the necessary packages before using this library.
- Copy 'compare-screenshots.py' file to your Robot Framework project.
- Then simply use it in your Robot file and use keywords in your test cases or tasks.
(Note: This library tested on windows platform, however, I am sure it will work on the Linux platform as well. If you found any issue then please let me know.)
https://www.linkedin.com/pulse/compare-screenshots-ameya-natu/
- RobotFramework (http://robotframework.org/)
- OpenCV (https://opencv.org/)