← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #669590]: Issues with VNC not able to find the image

 

Question #669590 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/669590

Description changed to:
Sikuli Version - 1.1.3
Java JDK - 1.8.0_171
Local O/S - Windows 10
Remote O/s - Windows 2016 Server VM (Hosted on AWS)

>From  windows 10 machine we are trying to execute sikuli script  on a
vnc server(ec2 windows 2016 server).  For some reason sikuli is not able
to find the image.  We tried pretty much everything that are mentioned
in the blogs but not able to get it working.  Below is the code that we
are using

vnc = VNCScreen.start("xxx.xx.xx.xxx", 5900, "xxxxxx", 10, 1000);
 vncScreen.showScreens();
 vncScreen.setAutoWaitTimeout(60);
 vncScreen.doubleClick(new Pattern("imgs/chrome.PNG")); //open chrome
 vncScreen.click(new Pattern("imgs/search.png")); //click search bar
 vncScreen.type("https://www.mozilla.org/en-US/firefox/new/";); //input url : https://www.mozilla.org/en-US/firefox/new/
 vncScreen.keyDown(KeyEvent.VK_ENTER); //press enter key
 vncScreen.wait(3.0);  //wait 3 seconds for the page to load
 vncScreen.click(new Pattern("imgs/download.PNG"));  //click download button

We tried taking the images with all the resolutions.  
1) Logged into ec2 instance and took the images(Defualt 1920x1080)
2) Connected to the VNC viewer(TigerVNC) and took the images
3) Changed the ec2 instance resolution to 1024x768(Default resolution) and took the images

We also performed the screen capture when connecting to the VNC and what
we observed is that the screens are not getting loaded properly.  To
eliminate the network issue we used tigerVNC Viewer to connect to the
remote server and we didn't have any problem connecting and navigating
in the remote system.

We also tried running two ec2 windows 2016 servers(running the scripts
on one instance and connecting with vnc on the other instance)  in same
subnet .  We took the screen captures and see the same issue of the
screens not getting loaded properly.

I am suspecting that we are missing some setting within the VNC Api but
we are not able to point what that setting is.  Below are the debug logs

[debug] RunTimeAPI: initAPI: leaving
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
After Connecting to the VNC
[debug] Mouse: init start
[debug] RunTimeAPI: loadLib: VisionProxy.dll
[debug] Mouse: init end
[debug] CLICK on L(960,540)@R[0,0 1920x1080]@S(0) E:Y, T:3.0 (1053 msec)
[debug] ImagePath: new BundlePath:
/C:/Users/Smartlink User/Downloads/SikuliProject/SikuliProject/
[debug] Image: loaded: imgs/chrome.png (file:/C:/Users/Smartlink User/Downloads/SikuliProject/SikuliProject/imgs/chrome.PNG)
[debug] Image: cached: imgs/chrome.png (12 KB) (# 1 KB 12 -- 0 % of 64 MB)
[debug] Region: wait: waiting 60.0 secs for imgs/chrome.png to appear in NonLocal, 1920x1080
FindFailed: imgs/chrome.png: (56x55) in R[0,0 1920x1080]@S(0) E:Y, T:60.0
[debug] Region: handleFindFailed: P(imgs/chrome.png) S: 0.7
  Line 2782, in file Region.java
[debug] Region: wait: imgs/chrome.png did not appear [60257 msec]

	at org.sikuli.script.Region.wait(Region.java:2782)
	at org.sikuli.script.Region.find(Region.java:2329)
	at org.sikuli.script.Region.getLocationFromTarget(Region.java:3238)
	at org.sikuli.vnc.VNCScreen.getLocationFromTarget(VNCScreen.java:171)
	at org.sikuli.script.Region.doubleClick(Region.java:3785)
	at org.sikuli.script.Region.doubleClick(Region.java:3770)
	at com.test.SikuliDemo1.testDemo(SikuliDemo1.java:18)
	at com.test.VNC_Test.vncSre(VNC_Test.java:24)
	at com.test.Main.main(Main.java:10)
[debug] RunTimeAPI: final cleanup
[debug] FileManager: deleteFileOrFolder:
C:\Users\SMARTL~1\AppData\Local\Temp\Sikulix_809320775

Process finished with exit code 0

Can you please help us in resolving this issue.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.