Re: [Sikuli-driver] [Question #701193]: Error with runnable fat jar outside of IDE
Question #701193 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701193 Ralph gave more information on the question: I replaced static { new Finder(new Screen().capture(0, 0, 1, 1)); } with System.loadLibrary(Core.NATIVE_LIBRARY_NAME) and copied opencv_java342.dll to \bin and the error is gone now. Application works ok on the non-IDE PC :) -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701193]: Error with runnable fat jar outside of IDE
Question #701193 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701193 Status: Answered => Open Ralph is still having a problem: Hi, thanks heaps but still get a similar error: Exception in thread "main" java.lang.UnsatisfiedLinkError: 'long org.opencv.core.Mat.n_Mat()' at org.opencv.core.Mat.n_Mat(Native Method) at org.opencv.core.Mat.(Mat.java:30) at org.sikuli.script.Finder$FindInput2.(Finder.java:1167) at org.sikuli.script.Finder$FindInput2.(Finder.java:1161) at org.sikuli.script.Finder.(Finder.java:34) at utils.MainClass.(MainClass.java:25) The PC I am running on is Win10 and has Java DevKit 17.0.2 installed. The Java environment variables are set and I have copied opencv_java342.dll to various system folders in the path to see if that helps. The jar runs standalone without error on the IDE PC which has the same OS and same version/configuration of Java. The only solutions installed from the eclipse marketplace are Maven (Eclipse m2e) and TestNG. I have tried creating the fat jar with maven-assembly-plugin and maven- shade-plugin and get the same error The following folders exist under \roaming\sikulix Extensions SikulixDownloads SikulixLibs (contains opencv_java342.dll) SikulixStore SikulixTesseract -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701201]: How to create a banner for the test run?
Question #701201 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701201 RaiMan proposed the following answer: Currently there is no such feature available (Is on the list for 2.0.6). You can do the following workaround: where = Region(300, 300, 1, 1) def blocker(loc): Do.popError("Do not touch anything\nJust watch", loc) import thread # create a popup at the specified location (popup center) thread.start_new_thread(blocker, (where,)) wait(3) # here comes your payload # this will close the popup click(where) type(Key.ENTER) wait(3) # more payload This solution currently has a caveat: each popup creates an undecorated frame (size 2x2, tiny window), that will not be disposed when the popup closes. the tiny windows vanish, when the IDE shuts down. If this tiny problem is a problem: from SikuliX scripts the complete Java world is useable: create your own JFrame with a text label, make it visible, move it around and close it as needed. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701193]: Error with runnable fat jar outside of IDE
Question #701193 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701193 RaiMan proposed the following answer: put the following at the top of your main class: static { new Finder(new Screen().capture(0, 0, 1, 1)); } Looks a bit odd, but it takes care, that the \Sikulix folder is created and the OpenCV DLL is exported and loaded, before any SikuliX features are touched. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701210]: Same image not found on different devices/systems --- especially with textual content
Question #701210 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701210 Summary changed to: Same image not found on different devices/systems --- especially with textual content -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701210]: Same image not found on different devices/systems
Question #701210 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701210 Gjorgji posted a new comment: Also, thanks RaiMan for the quick answer, appreciate it. > - avoid textual content in the shot (font rendering is the one, that brings > the most differences) This here explains all of my issues. As I said, I wasn't experiencing this issue on some images, so after reading this I double-checked and indeed images with text in them are the ones that experience this. For instance, buttons that have only icons are found without any issues on different systems. Ahh, I was afraid this would be the case, but if the only option is to create images for each system/device, that is what I shall do. Again, thanks, and my question was solved. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701210]: Same image not found on different devices/systems
Question #701210 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701210 Status: Answered => Solved Gjorgji confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701193]: Error with runnable fat jar outside of IDE
Question #701193 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701193 Status: Open => Answered RaiMan proposed the following answer: ok, I will check/test and make you a suggestion for a workaround asap. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701210]: Same image not found on different devices/systems
Question #701210 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701210 Status: Open => Answered RaiMan proposed the following answer: No easy solution for this. Since Java 11 getting the screen content is compatible for all screen setups (Windows, Mac, Linux) even for Retina/4K displays. Eliminating the pixel-boost is done inside Java. Resolution usually does not matter, as long as the display setup is run with 100% scaling. Background: to find an image on a screen (in fact an image shot of the screen), it must be visible with the same width and height. SikuliX's resize feature might help in situations, where you know the scaling factor (e.g. 120%). If we now look at different systems, then there are big differences, how images might be rendered to the screen (compatible resolution and scaling supposed). So even if the image might be visible with the same width and height, the pixel content might differ substantially (which is not always obvious for the user's eyes). Basic recommendations: - make the shots with the SikuliX IDE (given in your case) - concentrate the shot to the parts that makes it unique (as little surrounding background as possible) - avoid textual content in the shot (font rendering is the one, that brings the most differences) In the end, there is no other solution, than to have image sets for every system/screen setup, if the above mentioned measures do not work sufficiently. similarities below 0.7 but higher than 0.5 indeed are risky, but in testing environments it might be possible, to make additional checks (e.g. match position inside app window), but of course lead to more effort. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #700996]: Is it possible with sikuli to get the exact location of text (X and Y) within an image during runtime?
Question #700996 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/700996 Status: Open => Expired Launchpad Janitor expired the question: This question was expired because it remained in the 'Open' state without activity for the last 15 days. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701210]: Same image not found on different devices/systems
Question #701210 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701210 Summary changed to: Same image not found on different devices/systems -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #701210]: Issues with running same script on different devices
Question #701210 on SikuliX changed: https://answers.launchpad.net/sikuli/+question/701210 Gjorgji gave more information on the question: Forgot to mention, all the devices have Java 11 installed from AdoptOpenJDK. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Question #701210]: Issues with running same script on different devices
New question #701210 on SikuliX: https://answers.launchpad.net/sikuli/+question/701210 I'm creating scripts for testing an application on multiple OSes. The application is the same on all OSes. The scripts run perfectly on all OSes, but I'm encountering an issue with finding some images if they were taken from the other OS. All screenshots were taken from Sikuli's IDE. Version of Sikuli used is 2.0.5. Initially, I create the scripts and screenshots from the Linux (Ubuntu) which is a virtual machine run on Oracle VM Virtual Box on a Windows machine. Then I ran the same scripts on a (Retina Display) MacBook Air (M1, 2020) with latest Big Sur on it. The images were not found and the scripts were failing. Afterward, I retook the same screenshots on the Mac device, and the script was working perfectly on it, but now it was failing on the Linux VM. Confirmed that it failed on Windows as well because I wanted to see if it was perhaps failing because the Linux was a VM. I found that if I lower the similarity to ~0.57 the screenshot is found, but this might cause me some issues in the future. I did some research and found that Retina displays have a higher resolution, but that if a screenshot is taken from Sikuli's IDE, the resolution is halved to counter this. Also, I did try with using `resize()` on the images with different values, and no luck there. I really do not want to take multiple screenshots of the same things for each environment, so that's why I'm writing here. Is there a way to accomplish what I want, that is a single image be found on multiple OSes and devices for the same application? Perhaps setting the displays to specific resolutions? Or is there a way to somehow modify the screenshots within the script to resolve this? Thanks. -- You received this question notification because your team Sikuli Drivers is an answer contact for SikuliX. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp