I have a small issue with ScreenCap library, linked to the monitor parameter
I simply use :
Take Partial Screenshot name=screen quality=100 left=25 top=450 width=1750 height=300 monitor=0
But on my two screens setup, no matter the monitor value is (0, 1, 2…) the left screen is always captured.
Worse for some values (i.e. 1) screenshot is performed, but with a smaller size/ratio.
I’m maybe missing something…
Additional infos is that my top TEST_SETUP has a mechanism to Start Video Recording and here the monitor parameter works.
Only difference is that parameter is set in Library importing part.
On the test case issue I have not ScreenCap import and the keyword is functioning.
I had a little free time, so did some digging, I think the problem is here
I started from here:
and followed the code paths to endup at the point above.
If I understood correctly if is_pygtk is false (I think this means windows) and you are taking a png screenshot then the monitor variable is not used and it looks like it doesn’t even do the partial screenshot
Can you try using a jpeg screenshot and confirm my suspicion?
Thanks for the digging.
Indeed it seems that some part are not used in my case…
I don’t have the setup right now being on the move. But I’ll give it a try and let you know.
Thanks !
Made tests just now, setting the format=jpeg in the Take Partial Screenshot keyword works properly.
It takes screenshot with monitor 1 or 2 as settled also in the keyword.
Value 0 should do both screens, but on a partial screenshot not sure about expected behavior.
Anyway I’ve opened an issue on the library, see if something can be done.
The concerned tests are runned in Docker so it’s not a big issue, but when debugging or else outside of the container this can be cumbersome.