Re: [Sikuli-driver] [Question #676662]: SikuliX IDE to fill more than one input field
Question #676662 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676662 Status: Open => Invalid RaiMan changed the question status: see your other question -- 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 #676661]: SikuliX IDE to type path to input form
Question #676661 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676661 Status: Open => Answered RaiMan proposed the following answer: type() only accepts some ASCII characters on an US keyboard (see docs) try paste() instead. -- 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 #676668]: Runnuble jar file does not created corectly
New question #676668 on Sikuli: https://answers.launchpad.net/sikuli/+question/676668 I apologize if this question has already been asked. I use Sikuli 1.1.3 I add Yaml module to sikuli I add sikulixapi.jar in folder with sikuli. I want to do runnable jar, but when I try to do this, I have error in IDE: Compiling C:/Users/user/AppData/Roaming/Sikulix/SetupStuff/scriptCompiled\__run__.py ... SyntaxError: ("mismatched input 'projects' expecting NEWLINE", ('C:\\Users\\user\\AppData\\Roaming\\Sikulix\\SetupStuff\\scriptCompiled\\__run__.py', 4, 14, 'import Sikuli projects.VKPOST_test_yaml\n')) I don't find this folder 'SetupStuff' on my PC. My project is very simple: import yaml config = yaml.load(open("C:\Users\user\Documents\Sikuli projects.VKPOST_test_yaml.sikuli\config.yml", 'r')) print config['address'] openApp (config['address']) openApp("C:\\Program Files\\Opera\\launcher.exe") from datetime import datetime, timedelta date1 = datetime.strftime(datetime.now(), "%d/%m/%Y") date2 = "01/01/2019" newdate1 = time.strptime(date1, "%d/%m/%Y") newdate2 = time.strptime(date2, "%d/%m/%Y") if(newdate1>newdate2): print ("win") print newdate1 print newdate2 else: print ("lose") print newdate1 print newdate2 print SCREEN.getH() print SCREEN.getW() Can you help me? -- 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 #676668]: Runnuble jar file does not created corectly
Question #676668 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676668 Status: Open => Answered RaiMan proposed the following answer: If you are talking about the IDE FileMenu entry: ... not longer supported, so I have to leave you alone with that. --- comments: - I add Yaml module to sikuli I guess you are talking about Lib/sikuli in SikuliX appdata: This helps to run your script, but will not be in the "runnable jar" - I add sikulixapi.jar in folder with sikuli. does not help anything and should not be done, to avoid any conflicts - C:\Users\user\Documents\Sikuli projects.VKPOST_test_yaml.sikuli\config.yml apparently the space in ...Sikuli projects... makes problems ... and other characters than letters, numbers, hyphen and underscore should not be in .sikuli folder names (at least risky, because there might still be "hidden" bugs). - folder SetupStuff is surely a temp folder and might be already deleted ??? -- 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 #676658]: how does observeEvent work exactly ?
Question #676658 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676658 Status: Open => Needs information RaiMan requested more information: I have to check. In fact it should work like you thought it should work ;-) Is the phone_region always the same Region OBJECT? try to define the phone_region once outside the loop together with the phone_region.onChange(50,handler) # observe for changes in region so your function should only be: def observe_and_click(phone_region, pixel_region, handler, observe_time): pixel_region.click() # make pixel click on region phone_region.observe(observe_time) # how long to observe for -- 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 #676662]: SikuliX IDE to fill more than one input field
New question #676662 on Sikuli: https://answers.launchpad.net/sikuli/+question/676662 I try to use SikuliX IDE to fill more than one input fields on the same screen. All the fields look like the same. I captured input field, click on it and use type to set value, but text is not present after that process. -- 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 #676661]: SikuliX IDE to type path to input form
New question #676661 on Sikuli: https://answers.launchpad.net/sikuli/+question/676661 I use following code in SikuliX IDE 1.1.4 to click in a text input field and type a folder path in it. records = Dir.glob("**/*/") records.each do |item| click("1544078258957.png") type(item) end I get error message: [error] --- Traceback --- error source first line: class ( method ) file 77: RUBY ( block in click ) uri:classloader:/Lib/sikulix.rb 129: org.jruby.RubyMethod ( call ) org/jruby/RubyMethod.java 156: RUBY ( block in click ) uri:classloader:/Lib/sikulix.rb 7: RUBY ( ) -- 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 #676645]: ImportError: no module named sikuli
Question #676645 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676645 Status: Open => Answered RaiMan proposed the following answer: --- Is it possible to run the python script to execute sikuli? ... yes, but at least this has to be obeyed (see comment #1) the intro statements for standalone .py scripts is import org.sikuli.script.SikulixForJython from sikuli import * ... and sikulixapi.jar has to be on the classpath. ... and finally you have to solve the "where are the images loaded from" problem (imagePath). --- extending what is generated by Sikuli during the save process not sure what you mean by that? -- 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 #676658]: how does observeEvent work exactly ?
New question #676658 on Sikuli: https://answers.launchpad.net/sikuli/+question/676658 So ive been reading the sikuliX api on observing events and Im not able to understand certain events that happen when i try coding it out myself. I wrote this function that clicks a region, and after the click will observe that region for any change in pixels. def observe_and_click(phone_region, pixel_region, handler, observe_time): pixel_region.click() # make pixel click on region phone_region.onChange(50,handler)# observe for changes in region phone_region.observe(observe_time) # how long to observe for this is the handler function for the above. def handler(event): global i r = event.getRegion() # get the observing region for this event path = capture(r,"/Users/ongyichong/SikuliX/Scripts",str(i)) i += 1 print(path) r.stopObserver() So every click of an event would trigger the handler function once since at the end of the handler function i make the observation stop. However my message log prints something like this: [log] CLICK on L(55,109)@S(0)[0,0 1440x900] (109 msec) /Users/ongyichong/SikuliX/Scripts/0.png /Users/ongyichong/SikuliX/Scripts/1.png /Users/ongyichong/SikuliX/Scripts/2.png [log] CLICK on L(75,109)@S(0)[0,0 1440x900] (101 msec) /Users/ongyichong/SikuliX/Scripts/3.png /Users/ongyichong/SikuliX/Scripts/4.png /Users/ongyichong/SikuliX/Scripts/5.png /Users/ongyichong/SikuliX/Scripts/6.png where i get like 3 - 4 print statements for every click i make ? shouldnt Stopobserver() cause the handler to be called once per observe_and_click function call ? I have already tried reading the documentation but i cant seem to find any information that could explain this phenomenon. -- 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 #676645]: ImportError: no module named sikuli
Question #676645 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676645 Status: Answered => Open Dave Kane is still having a problem: RaiMan, Thanks for the speedy reply. I would like to use python to execute the scripts, extending what is generated by Sikuli during the save process as it packages/includes the .py and .png files. I'm currently running the command "jython dak2.py" which is generating the ImportError. Is it possible to run the python script to execute sikuli? David -- 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 #676658]: how does observeEvent work exactly ?
Question #676658 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676658 ONG YI CHONG posted a new comment: Btw i am running the function Observe_and_click inside a loop and there are certain transition effects when the onChange() is called, for example a menu bar popping up on the phone when it is clicked. Could that explain the multiple handler function being called ? -- 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 #676658]: how does observeEvent work exactly ?
Question #676658 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676658 Status: Needs information => Solved ONG YI CHONG confirmed that the question is solved: Yes, phone region is always the same region object. Hey your suggestion worked and it solved my problem ! Thank you so much -- 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 #160030]: [HowTo] sort matches returned from findAll()/Finder.find()
Question #160030 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/160030 hanumantha Katreddy posted a new comment: Hi Raimain,I am new to SikuliX with Java. Can you provide me the java code that you shared with Saorabh Singh, in the same thread? Sikulix Version : com.sikulix sikulixapi 1.1.0 Thanks,Hanu On Saturday, 8 December, 2018, 6:44:38 AM IST, hanumantha Katreddy wrote: Question #160030 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/160030 hanumantha Katreddy posted a new comment: hi Raiman, I am using SikuliX for past 3 months in Java. I come across a similar problem. My application has a screen, where text fields of similar shape and size are spread in tabular format. i want to input text in to a particular text field based on its sort order either row wise or column wise. Can you explain how to handle in java? Below is my code... public void setText(String elementpath,int clickonnthfind) throws Exception, FindFailed, InterruptedException { Region reg = getRegion(rootpath+"Common//TableScreen"); Pattern pat = new Pattern(elementpath); //text field image pattern Iterator it = reg.findAll(pat); //findAll(textfields)); int nth=1; while(it.hasNext()){ it.next().click(); it.next().type(String.valueOf(nth)); //this is randomly picking up text fields and setting text System.out.println("clicked at"+nth); Thread.sleep(3000); nth++; /*if(nth==clickonnthfind){ it.next().click(); System.out.println("clicked at"+nth); Thread.sleep(3000); }*/ } } -- You received this question notification because you are subscribed to the question. 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 #160030]: [HowTo] sort matches returned from findAll()/Finder.find()
Question #160030 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/160030 hanumantha Katreddy posted a new comment: Thanks I found answer. In latest version sikulixapi 1.1.0, i can see new methods. region.findAllByColumn(pattern); - This is working great. but one thing i didn't understand is, i can find max 10 occurances only in a screen. -- 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 #160030]: [HowTo] sort matches returned from findAll()/Finder.find()
Question #160030 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/160030 hanumantha Katreddy posted a new comment: hi Raiman, I am using SikuliX for past 3 months in Java. I come across a similar problem. My application has a screen, where text fields of similar shape and size are spread in tabular format. i want to input text in to a particular text field based on its sort order either row wise or column wise. Can you explain how to handle in java? Below is my code... public void setText(String elementpath,int clickonnthfind) throws Exception, FindFailed, InterruptedException { Region reg = getRegion(rootpath+"Common//TableScreen"); Pattern pat = new Pattern(elementpath); //text field image pattern Iterator it = reg.findAll(pat); //findAll(textfields)); int nth=1; while(it.hasNext()){ it.next().click(); it.next().type(String.valueOf(nth)); //this is randomly picking up text fields and setting text System.out.println("clicked at"+nth); Thread.sleep(3000); nth++; /*if(nth==clickonnthfind){ it.next().click(); System.out.println("clicked at"+nth); Thread.sleep(3000); }*/ } } -- 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 #676658]: how does observeEvent work exactly ?
Question #676658 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676658 RaiMan posted a new comment: Thanks for feedback. Daily business ;-) -- 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] [Bug 1807108] Re: [1.1.4] Windows: Android: Screenshot problem - lower part of screen image is black (varying)
No problem. I decided to run AndroidStudio on my Win10 to get the official emulator working. The Android eco-system is much more similar to a "normal" u*ix system like macOS, so I do not have panic to step into the basics in a short time. I will come back with any insights. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1807108 Title: [1.1.4] Windows: Android: Screenshot problem - lower part of screen image is black (varying) Status in Sikuli: In Progress Bug description: Sikuli versions: 1.1.4 OS: Windows 10 X64 IDE: Jython IDE I'm using adb to connect my emulator. Using menuToolAndroid to test, there're things failed. 1.Clicking "Check" Button: The first and second check was success. In the third check: a.The capture icon feature sometimes didn't pop out and cause the IDE didn't return. b.Although the capture icon feature pop out, Sikuli didn't click the icon I've captured and the IDE didn't return. 2.clicking "Default" Button: After clicking default,clicking the "Take a screenshot" Button on IDE doesn't pop out the screenshot feature and the IDE disappeared.Only I can do is to close java with task manager and restart the IDE. 3.In /API/src/main/java/org/sikuli/android/ADBScreen.java line 106,method public List getDevices() { List devices = new ArrayList<>(); if (device != null) { //<= no code written } return devices; } which always return empty list. Also, my test code is: adbscr = adbStart() reg = adbscr.newRegion(0, 0, 1600, 900) img = adbscr.capture(reg) img.save(path_to_save) it returns ADBDevice: captureDeviceScreenMat: image type not RGBA To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1807108/+subscriptions ___ 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 #676645]: ImportError: no module named sikuli
Question #676645 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676645 Status: Open => Answered RaiMan proposed the following answer: the intro statements for standalone .py scripts is import org.sikuli.script.SikulixForJython from sikuli import * ... and sikulixapi.jar has to be on the classpath. sorry, but the docs for that are a bit hidden ;-) https://github.com/RaiMan/SikuliX-2014/wiki/Jython-in-IDEs-like-Eclipse-or-running-it-from-commandline For running scripts from commandline simply use this command: java -jar /sikulix.jar -r /myscript.sikuli for the available parameters see: https://sikulix-2014.readthedocs.io/en/latest/faq/010-command-line.html -- 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] [Bug 1807108] Re: [1.1.4] Windows: Android: Screenshot problem - lower part of screen image is black (varying)
You can try bignox(https://en.bignox.com/) which supports mac. But I do not have a mac system so I have no idea if the adb works on emulator in mac system. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1807108 Title: [1.1.4] Windows: Android: Screenshot problem - lower part of screen image is black (varying) Status in Sikuli: In Progress Bug description: Sikuli versions: 1.1.4 OS: Windows 10 X64 IDE: Jython IDE I'm using adb to connect my emulator. Using menuToolAndroid to test, there're things failed. 1.Clicking "Check" Button: The first and second check was success. In the third check: a.The capture icon feature sometimes didn't pop out and cause the IDE didn't return. b.Although the capture icon feature pop out, Sikuli didn't click the icon I've captured and the IDE didn't return. 2.clicking "Default" Button: After clicking default,clicking the "Take a screenshot" Button on IDE doesn't pop out the screenshot feature and the IDE disappeared.Only I can do is to close java with task manager and restart the IDE. 3.In /API/src/main/java/org/sikuli/android/ADBScreen.java line 106,method public List getDevices() { List devices = new ArrayList<>(); if (device != null) { //<= no code written } return devices; } which always return empty list. Also, my test code is: adbscr = adbStart() reg = adbscr.newRegion(0, 0, 1600, 900) img = adbscr.capture(reg) img.save(path_to_save) it returns ADBDevice: captureDeviceScreenMat: image type not RGBA To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1807108/+subscriptions ___ 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 #676631]: cannot find image using find(image_path)
Question #676631 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/676631 Status: Needs information => Solved RaiMan changed the question status: seems to be solved -- 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] [Bug 1807108] Re: [1.1.4] Windows: Android: Screenshot problem - lower part of screen image is black (varying)
On Windows I have the "black-lower-part" effect with the emulator and my real device. On Mac it works as it should with my real device. ... but I do not have an emulator for Mac yet ** Summary changed: - [1.1.4] Android: Screenshot problem - ADBDevice: captureDeviceScreenMat: image type not RGBA + [1.1.4] Windows: Android: Screenshot problem - lower part of screen image is black (varying) -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1807108 Title: [1.1.4] Windows: Android: Screenshot problem - lower part of screen image is black (varying) Status in Sikuli: In Progress Bug description: Sikuli versions: 1.1.4 OS: Windows 10 X64 IDE: Jython IDE I'm using adb to connect my emulator. Using menuToolAndroid to test, there're things failed. 1.Clicking "Check" Button: The first and second check was success. In the third check: a.The capture icon feature sometimes didn't pop out and cause the IDE didn't return. b.Although the capture icon feature pop out, Sikuli didn't click the icon I've captured and the IDE didn't return. 2.clicking "Default" Button: After clicking default,clicking the "Take a screenshot" Button on IDE doesn't pop out the screenshot feature and the IDE disappeared.Only I can do is to close java with task manager and restart the IDE. 3.In /API/src/main/java/org/sikuli/android/ADBScreen.java line 106,method public List getDevices() { List devices = new ArrayList<>(); if (device != null) { //<= no code written } return devices; } which always return empty list. Also, my test code is: adbscr = adbStart() reg = adbscr.newRegion(0, 0, 1600, 900) img = adbscr.capture(reg) img.save(path_to_save) it returns ADBDevice: captureDeviceScreenMat: image type not RGBA To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1807108/+subscriptions ___ 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