← Back to team overview

sikuli-driver team mailing list archive

[Bug 1730645] Re: [2.0.0] Windows 10: Move mouse for click not working since new JRE and Windows update with Java 8 and HiDPI --- workaround Java 9 and scaling 100% OR try with Java 11

 

Hi,
I am quite new to Sikuli. I downloaded sikulixapi-2.0.1 jar from Link: https://raiman.github.io/SikuliX1/downloads.html
I am using this in Eclipse on windows with JAVA 1.8
I used Snipping Tool to take screenshot of About from Google HomePae.Then I wrote a basic program of navigating to Google URL and click on "About" link on the Google homepage.
Somehow, the arrow moves towards the "About" link on Google Homepage but stops before reaching the link and clicks at the location somewhat below the About Link. Attached screenshot of the same. Please suggest where am I going wrong?

Here's the piece of code -

System.setProperty("webdriver.gecko.driver", "C:\\Users\\gp0924\\Garima\\BrowserDriver\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();

driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

driver.get("http://google.com/";);
driver.manage().window().maximize();

Screen screen = new Screen();
Thread.sleep(3000);
Debug.info("Screen: %screen", screen);

ImagePath.setBundlePath("C:\\Users\\gp0924\\Desktop\\LatestSikuliImages");
String img = "About.PNG";
Region region = screen.exists(img);
region.highlight();
System.out.println(region.getROI());
region.click(img);


Below is the response:

[info] Screen: R[0,0 1280x720]@S(0)creen
[log] highlight M[31,185 63x27]On(0) S 10000 for 0.0 secs
R[0,0 1280x720]@S(0)
[error] RobotDesktop: checkMousePosition: should be L[62,198]@S(0)
but after move is L[62,199]@S(0)
Possible cause in case you did not touch the mouse while script was running:
 Mouse actions are blocked generally or by the frontmost application.
You might try to run the SikuliX stuff as admin.
[log] CLICK on L[62,198]@S(0) (541 msec)

** Attachment added: "Basic Search on Google failing with checkMousePosition error"
   https://bugs.launchpad.net/sikuli/+bug/1730645/+attachment/5315130/+files/Google%20Sikuli%20Test.docx

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1730645

Title:
  [2.0.0] Windows 10: Move mouse for click not working since new JRE and
  Windows update with Java 8 and HiDPI --- workaround Java 9 and scaling
  100% OR try with Java 11

Status in Sikuli:
  In Progress

Bug description:
  see: https://github.com/RaiMan/SikuliX1/issues/27
  --------------------------------------------------
  ********************* Java problem
  seems to be related to a problem with HiDPI and scaled monitor setups
  https://bugs.openjdk.java.net/browse/JDK-8196030

  The problem seems to exist with Java 8 not supporting HiDPI.

  Using Java 9 or 10 on HiDPI systems with a scaling of 100% seems to
  work

  Using Java 11 these experiences are reported:
  early build of jdk 11 and sikuli 1.1.4 is working good for hidpi, but still we observed few issues mentioned below:

  1) Sikuli scripts written using 4k (3840*2160) with recommended
  scaling (300%) is working only for the same recommended settings. If
  we change the resolution to 2K or 1080P or below , and also if we
  change scaling, scripts are failing

  2) Sikuli scripts written on 2k (2560*1600) with recomended scaling (200%) is working for for resolutions below 2k like 800*600 to 1920*1080 (Downscaling is working with this) and for 4k it is not working (Upscaling is not working)
  -------------------------------------------------

  wondering if anyone else is seeing this.

  I install the latest big update for Windows this morning and also
  accepted an update to the latest JRE.

  Now my when Sikuli moves the mouse to click on a match it doesn't land
  on the coordinates.   It even recognizes that it missed and has an
  error message saying it tried to move the mouse to (x, y), but landed
  on (p, q) instead.

  Any idea what is happening and how to fix it?

  Thanks!

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1730645/+subscriptions


References