[Sikuli-driver] [Question #678493]: How to take equal size screenshot
New question #678493 on Sikuli: https://answers.launchpad.net/sikuli/+question/678493 Hi, I want to know how i can take screenshots of equal size , because i am trying to write some scripts to automate and i want to verify whether the button is enabled or disabled. I tried to take screenshot of disabled button two times, and when i compared both of them using below code: img1="path of img1" img2="path of img2" f=Finder(img1) f.find(img2) if f.hasNext(): print ("similar") else: print("not similar") i got result as "not similar", but images are same, the problem is i am unable to take both screenshots of same size, slight difference is making the result false. Thank you in advance -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678420]: if expected image not exists in region/screen then scroll down the list box and see if expected image is present.
Question #678420 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678420 Status: Open => Solved Thanigai confirmed that the question is solved: Using do-while-loop i found solution for my problem. reg = Region(532,225,852,628) reg.highlight(5) x = 0 loop do if(reg.exists(Pattern("1549894425864.png").exact())) reg.click(Pattern("Next_Button.png").exact()) x = 1 else if(reg.exists(Pattern("1549894321973.png").exact())) reg.click(exists(Pattern("1549894321973.png").exact())) reg.click(Pattern("Next_Button.png").exact()) x = 2 else reg.click("DownArrow.png") reg.click("DownArrow.png") reg.click("DownArrow.png") reg.click("DownArrow.png") reg.click("DownArrow.png") reg.click("DownArrow.png") reg.click("DownArrow.png") reg.click("DownArrow.png") sleep 2 end end break if ((x == 1) or (x == 2)) end puts "HMSS DB is Selected" sleep 5 end -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)
Question #678427 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678427 Melvin Raymond gave more information on the question: I forgot to add the link to the page where I'm trying to figure out how to use the Sikuli Class app https://sikulix-2014.readthedocs.io/en/latest/appclass.html#App.setUsing -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)
Question #678427 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678427 Status: Answered => Open Melvin Raymond is still having a problem: I don't seem to have a grip on using the syntax for that class App. This is the last one I tried. It's one of many attempts that keep returning this error. robot.run returned: 252 robot.run output is here: /Users/labquest_automation/Desktop/SikuliX_Scripts/InvokeViewer.sikuli.robot 1.1.4-SNAPSHOT-2019-02-07_09:10/Mac10.14.2/Java8(64)1.8.0_201-b09 I dug around a bit to see if I could figure out what that means and found: "DATA_ERROR = 252 # Invalid data or cli args", which I guess means I've got a bad argument passed or something. I got that from here: "https://robot- framework.readthedocs.io/en/2.9.2/_modules/robot/errors.html" This is the final Script I attempted: runScript(""" robot *** Variables *** ${TESTAPP} "/Applications/Viewer.app" *** Settings *** Library ./inline/AppLibrary Test Setupstart my application${TESTAPP} *** Test Cases *** """) class AppLibrary(object): def start_my_application(self, myApp): someApp = App.open(myApp) -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678458]: I can't implement the rest of the function.
Question #678458 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678458 Description changed to: Hello. I'm trying to add two new lines but they are not being recognized. The function: def do(a, b, ab, abc, ef, efg): if not (exists(a, 0) and exists(ab, 0)): return doubleClick(abc) start = time.time() while exists(ab, 0): wait(0.1) while time.time() < (start + 3) and exists(a, 0): pass if exists(a, 0): doubleClick(b) return #to be implemented, it has been ignored by the function/script. #It should be triggered whenever the img5 appears. #just to be clear, the img5 will only exist if the img1 doesn't exist if exists(ef, 0): doubleClick(efg) while True: do(a="img1", b="img2", ab="img11", abc="img111", ef="img5", efg="img51") do(a="img1", b="img2", ab="img12", abc="img121", ef="img5", efg="img51") I already tried removing the return, add a new pass, put a new return, but nothing has been effective. It's just anything happens, the function is ignoring that part. Thank you for all your help. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678478]: How to import cx_Oracle library into python SikuliX script --- not possible (C-based)
Question #678478 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678478 RaiMan proposed the following answer: cx_Oracle only works with Python (C-based Python), but from there you cannot use SikuliX directly, but only with some Python-Java wrapping (like pyjnius). So if you need direct access to your DB during scriptrun, then it will be a stony way - may be impossible. If acceptable: write what you need from your DB to a CSV-file and use that in your script. Surely there might be other workarounds, like running Python scripts from SikuliX using subprocess, that return some stuff to be used in the script. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678428]: [1.1.14 Jython] App() crashes with Java NPE --- sikulixapi.jar MUST be on Java classpath
Question #678428 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678428 Summary changed to: [1.1.14 Jython] App() crashes with Java NPE --- sikulixapi.jar MUST be on Java classpath -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678428]: [1.1.14 Jython] App() crashes with NullPointerException
Question #678428 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678428 RaiMan proposed the following answer: I made some tests with different scenarios. --- pyjnius In the current shape of SikuliX it is not useable with jnius from Python. I now have it on the list to make it useable though. Might take a while, but seems to be worth it --- plain Jython The sikulixapi.jar MUST be on the Java classpath (environment CLASSPATH) at time of first use of any SikuliX feature. Simply having it on sys.path does not work (causes the NPE with App("test") as mentioned above) -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678478]: How to import cx_Oracle library into python SikuliX script --- not possible (C-based)
Question #678478 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678478 ANTONIO CARLOS PAES NASCIMENTO posted a new comment: Hi RaiMan, First off all thanks for answering. And if I use another dev tool like Sublime and try to import sikulix inside that tool, or something in this line? Thanks. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678478]: How to import cx_Oracle library into python SikuliX script --- not possible (C-based)
Question #678478 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678478 Status: Open => Answered RaiMan proposed the following answer: Supposing the module cx_Oracle is in a place, where it can be found by SikuliX (containing folder is in sys.path). Sorry, but since SikuliX is Java based using the Jython interpreter, only Python modules written in plain Python language can be imported. cx_Oracle seems to depend on native libraries, which means it contains C-based code, which leads to the ImportError: No module named cx_Oracle -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678478]: How to import cx_Oracle library into python SikuliX script --- not possible (C-based)
Question #678478 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678478 Summary changed to: How to import cx_Oracle library into python SikuliX script --- not possible (C-based) -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678481]: App instance changed in 1.1.4 compared to 1.1.2?
Question #678481 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678481 RaiMan proposed the following answer: The logs of the App features are now hidden by default. use print procedit or App.logOn() # switch on App.logOff() # off again -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678481]: App instance changed in 1.1.4 compared to 1.1.2?
Question #678481 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678481 Status: Open => Answered RaiMan proposed the following answer: Yes, the App class is completely revised and still under development. Your problem might come from the fact, that now the open() waits for the app to be running and then issues a focus(). So you either have to stick with 1.1.2 or find a way, to get the dialog back to front. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)
Question #678427 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678427 Status: Open => Answered RaiMan proposed the following answer: All you need to learn how to implement your own keywords see here: https://sikulix-2014.readthedocs.io/en/latest/scenarios.html#using-robotframework start with the inline class definition and then you might store the class file outside, to use it more than once in different tests. In the keyword def just use the normal SikuliX Python scripting (class App in this case). -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678427]: Mojave : SikuliX IDE : I need to create a Keyword for invoking my app with Robotramework (from the SikuliX IDE)
Question #678427 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/678427 Melvin Raymond gave more information on the question: I was able to invoke my app using this chunk of code which a developer gave me. I will attempt to see if I can get the Robot Framework to use it with a Keyword somehow. #!/usr/bin/python import subprocess subprocess.call(["/usr/bin/open", "-a", "Labquest Viewer"]) Click to expand inline (7 lines) 3:08 PM chmod 0777 thing.py 3:08 PM ./thing.py -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678481]: App instance changed in 1.1.4 compared to 1.1.2?
New question #678481 on Sikuli: https://answers.launchpad.net/sikuli/+question/678481 i have been using nightly 1.1.2 since march 2018. I decided to try downloading and using the 1.1.4 Snapshot nightly (2019-01-30_21:31) when my script that contains an app instance like this: procedit = App(os.path.join(r"C:\tssmoketest", "2020", "procedit.exe")) and I call it like this procedit.open() it launches the application however there is a modal dialog that launches for that application that you have yo click continue ot stop. that dialog falls behind my application causing the script to fail because im looking for that dialog with a saved image to click continue or stop. also there is nothing in the LOG/Message area at the bottom of the IDE either. in the older 1.1.2 March nightly I was using, it does not happen like this AND it always shows: [log] App.open [824:ProcEdit.exe] in the message area at the bottom. im on windows 10 latest build fall creators edition etc etc version 1803 (build 17134.523) Java 7 and 8 are both installed is there anything else i should be including? please let me know, thank you! Shawn -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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 #678478]: How to import cx_Oracle library into python SikuliX script
New question #678478 on Sikuli: https://answers.launchpad.net/sikuli/+question/678478 Hi guys, I'm trying to import cx_Oracle library into my python test script inside sikulix, however I'm getting this error: [error] script [ connect_and_print ] stopped with error at line --unknown-- [error] Error caused by: Traceback (most recent call last): File "C:\Users\BRX Retail\Desktop\Testes_automatic\connect_and_print.sikuli\connect_and_print.py", line 3, in import cx_Oracle ImportError: No module named cx_Oracle My imports are: import random import org.sikuli.script.SikulixForJython import cx_Oracle Can you guys help me? Thanks, Antonio -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ 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