sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #47467
Re: [Question #670339]: FindFailed with VNCScreen
Question #670339 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670339
RaiMan proposed the following answer:
made a quick test in max local environment:
Server: TightVNC on a Windows 10 machine
Client: Mac running a script with latest 1.1.3
# script:
vs = vncStart("192.168.2.120")
if not vs:
print "no connection"
exit()
wait(1)
cap = vs.userCapture("gimmi")
img = "_vncscreen"
cap.saveInBundle(img)
vs.hover(img)
off()
My findings:
Even in my local network, the initial fill of the frame buffer after the VNCScreen.start() takes about 1 second.
So without the wait(1) I get a black screen with the userCapture(), with it, the screen content is correct.
Doing a search with an image directly after the VNCScreen.start() works
for me, because of the standard wait time of 3 seconds (in my case doing
the vs.hover(img) directly after start)
so you might try this:
VNCScreen client = VNCScreen.start(<ip-address>, <port>, <password>, 10, 1000);
try {
//client.click(new Pattern("D:\\example.png").similar(0.5f));
client.click(client.wait("D:\\example.png", 10));
}
catch (FindFailed e) {
e.printStackTrace();
}
finally {
client.close();
}
... so adding some time to wait for the frame buffer to get filled the
first time.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.