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

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Niko
Solved:
Last query:
Last reply:
Revision history for this message
TestMechanic (ndinev) said :
#1

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

Revision history for this message
Niko (ntsirak1) said :
#2

Thanks, I ended up doing something similar