Is there an way to make sure the screen data has been populated (i.e. is not all black) before running an operation?

Asked by Niko on 2019-07-16

Hello,

I'm trying to write a screenshot script over VNC, and I find myself needing to include a sleep() statement after I connect to the screen. Without the sleep statement, the screen is black in the .png. Is there a way for me to wait until the screen has initialized in a more intelligent manner? Thanks!

Niko

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Niko
Solved:
2019-07-21
Last query:
2019-07-21
Last reply:
2019-07-19
TestMechanic (ndinev) said : #1

You can check if your screenshot is black and retake it again until it is not black

Niko (ntsirak1) said : #2

Thanks, I ended up doing something similar