canonical / mir-ci

Mir CI helpers
1 stars 1 forks source link

Integrate Robot with screencopy #62

Closed hbatagelo closed 5 months ago

hbatagelo commented 5 months ago

This PR proposes a Robot library (Screencopy.py) that provides keywords for matching image templates with frames captured from the Wayland display. The keywords are:

For both, if no match is found, an exception is raised, and the screenshot and the template are written to the Robot log.

The following additional keywords are available in screencopy.resource:

An example of these keywords in action is given in test_drag_and_drop.py.

codecov[bot] commented 5 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (b38a64f) 64.64% compared to head (2e7aa1b) 64.46%.

Files Patch % Lines
mir-ci/mir_ci/screencopy_tracker.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #62 +/- ## ========================================== - Coverage 64.64% 64.46% -0.18% ========================================== Files 11 11 Lines 724 726 +2 Branches 88 88 ========================================== Hits 468 468 - Misses 233 235 +2 Partials 23 23 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

hbatagelo commented 5 months ago

I've changed grab_screenshot to look for the next frame (this will fix issue #66) and have added the timeout. Seems to work well.