[Sikuli-driver] [Question #232718]: Can detect the text on screen but can't find it
New question #232718 on Sikuli: https://answers.launchpad.net/sikuli/+question/232718 Greetings, I want to find if a certain text exists on the screen. I am aware that there are multiple issues with text recognition and hence initially I've tried to see what IS being detected on the screen and then try to find the text which I am certain it was detected. So I have the following code: Settings.OcrTextSearch = True Settings.OcrTextRead = True reg = Region(0,0,1280,100) reg.highlight(1) print reg.text() At this point I get some print in the command line and I can the see the text I want to search for later. Then I try to search for that specific text in that region as follows: reg.find(text) However I get a FindFailed error this time. Is that one more issue with text recognition or is it my mistake? Thanks! Gene -- You received this question notification because you are a member of Sikuli Drivers, which 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 #231053]: 'KEY_WIN' is not defined in imported script --- add: from sikuli import *
Question #231053 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/231053 Eugene S confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because you are a member of Sikuli Drivers, which 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 #231053]: 'KEY_WIN' is not defined in imported script --- add: from sikuli import *
Question #231053 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/231053 Eugene S posted a new comment: Hi RaiMan, Sorry for the unclear question. Anyway it was my mistake, not related to Sikuli. So everything is working as expected right now. Thanks! Eugene -- You received this question notification because you are a member of Sikuli Drivers, which 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 #231053]: 'KEY_WIN' is not defined error when importing from module
New question #231053 on Sikuli: https://answers.launchpad.net/sikuli/+question/231053 I have a number of tests, each one in a separate file. In order to make these scripts more readable and clear I have decided to move some of the functionality to external file and import it as a module to each script. For example consider the following piece of code which I have moved to that module: type(r, KEY_WIN) localLog.debug(WIN+R key pressed) paste(link) localLog.debug(%s pasted, link) type(Key.ENTER) localLog.debug(Enter pressed) This is defined in the module as function windowsRun(link) so I when the module imported I should have been able to run it like that (assuming that the module name is generics) : generics.windowsRun(some_link) When I run my main script it seems that the module is being recognized and imported properly however I end up with the following error: NameError: global name 'KEY_WIN' is not defined Any idea why this might happen? Thanks! Eugene -- You received this question notification because you are a member of Sikuli Drivers, which 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 #231053]: 'KEY_WIN' is not defined in imported script --- add: from sikuli import *
Question #231053 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/231053 Status: Answered = Solved Eugene S confirmed that the question is solved: Yes of course! I completely forgot about that. Thanks! Not related to this specific issue but I see that all the logging which happen in the module is not being printed to the screen. Any idea why is that? (I can start a separate question) Cheers, Eugene -- You received this question notification because you are a member of Sikuli Drivers, which 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 #230867]: Getting a ClassNotFoundException exception when running sikuli-script from command line
Question #230867 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/230867 Eugene S posted a new comment: Yes, I have tried to run the script as follows and it succeeded: C:\Sikuli\TestsC:\Sikuli\sikuli-script.cmd -j6 -r C:\Sikuli\Tests\eReferrals.sikuli I have also discovered that swapping the arguments will not work. I'm not sure whether that's a way is supposed to work or a defect. C:\Sikuli\TestsC:\Sikuli\sikuli-script.cmd -r -j6 C:\Sikuli\Tests\eReferrals.sikuli Cheers, Eugene -- You received this question notification because you are a member of Sikuli Drivers, which 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 #230867]: Getting a ClassNotFoundException exception when running sikuli-script from command line
Question #230867 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/230867 Eugene S posted a new comment: Thanks for your super quick replies! :) I will then use the suggested workaround until the fix is being introduced in the next version. Cheers, Eugene -- You received this question notification because you are a member of Sikuli Drivers, which 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 #230928]: Logging does not work as expected
New question #230928 on Sikuli: https://answers.launchpad.net/sikuli/+question/230928 I have designed few automation scripts and now want to create few log files. Since I understood that standard Python functionality should work, I just went through few Python tutorials about how to create log files. However for some reason, it seems that what works normally in Python interpreter, doesn't work in Sikuli-IDE. For example I have this simple example: import logging logging.warning('Watch out!') # will print a message to the console logging.info('I told you so') # will not print anything In this case (as stated in the comments), I should not see the second line in console. This is since warning is the default log level in Python and the only one which should appear in the console. However, when I run this code in Sikuli-IDE, I have both lines being printed in the console. Second example is this one: import logging logging.basicConfig(filename='example.log',level=logging.DEBUG) logging.debug('This message should go to the log file') logging.info('So should this') logging.warning('And this, too') Here I expect the 'example.log' file to be created and include all the log events. In this case, no file is being created after the execution. In both cases the execution is done successfully and work as expected when I try it in Python interpreter directly (I tested in Python 3.3.2) Any idea why are these differences appear? Thanks! Eugene -- You received this question notification because you are a member of Sikuli Drivers, which 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 #230867]: Getting a ClassNotFoundException exception when running sikuli-script from command line
Question #230867 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/230867 Status: Answered = Solved Eugene S confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because you are a member of Sikuli Drivers, which 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 #230742]: [1.0] Windows: Want to run test from command line but can't find sikuli-ide.exe or sikuli-ide.bat --- solution
Question #230742 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/230742 Eugene S posted a new comment: Thanks RaiMan. Now I can run the script. However in the below attached FAQ page, it is stated that the following should be used: PATH-TO-SIKULI/sikuli-ide.exe [options] or PATH-TO-SIKULI/sikuli-ide.bat [options] http://doc.sikuli.org/faq/010-command- line.html?highlight=run%20from%20command%20line Thanks! -- You received this question notification because you are a member of Sikuli Drivers, which 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 #230742]: [1.0] Windows: Want to run test from command line but can't find sikuli-ide.exe or sikuli-ide.bat --- solution
Question #230742 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/230742 Status: Answered = Solved Eugene S confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because you are a member of Sikuli Drivers, which 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 #230867]: Getting a ClassNotFoundException exception when running sikuli-script from command line
New question #230867 on Sikuli: https://answers.launchpad.net/sikuli/+question/230867 I have viewed few questions which seemed to have a problem similar to mine but it looks like I have something different in my case. When I start a sikuli-script from command line under Windows 7, I get the following error: C:\Sikuli\TestsC:\Sikuli\sikuli-script.cmd -r C:\Sikuli\Tests\ADRS.sikuli -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -r C:\Sikuli\Tests\ADRS.sikuli +++ using as SIKULIX_HOME: C:\Sikuli\ +++ this Sikuli version is 32-Bit java version 1.6.0_29 Java(TM) SE Runtime Environment (build 1.6.0_29-b11) Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode, sharing) +++ trying to start Sikuli Script Exception in thread main java.lang.NoClassDefFoundError: org/sikuli/script/Sik uliScript Caused by: java.lang.ClassNotFoundException: org.sikuli.script.SikuliScript at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) Could not find the main class: org.sikuli.script.SikuliScript . Program will exit. Any suggestion as to what can cause such behavior and how can it be fixed? Thanks in advance! -- You received this question notification because you are a member of Sikuli Drivers, which 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 #230867]: Getting a ClassNotFoundException exception when running sikuli-script from command line
Question #230867 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/230867 Eugene S posted a new comment: Just found out that it might be related to the Bug #1182870. Am I right? -- You received this question notification because you are a member of Sikuli Drivers, which 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 #230742]: Want to run test from command line but can't find sikuli-ide.exe or sikuli-ide.bat
New question #230742 on Sikuli: https://answers.launchpad.net/sikuli/+question/230742 I have testing scripts saved in the following manner (A.sikuli, B.sikuli,... are all folders): C:\Sikuli\Tests\ -A.sikuli -B.sikuli -C.sikuli -ImagesRepoitory. Inside each folder I have following files: file.HTML file.py I want to run some of my test scripts from the command line and according to the instructions I have to do it in the following way: PATH-TO-SIKULI/sikuli-ide.exe [options] or PATH-TO-SIKULI/sikuli-ide.bat [options] However, I can't locate any executable files in Sikuli folder. Until now I have just used the IDE which extension is *.cmd. I have tried the following command: C:\Sikuli\sikuli-ide.cmd -r D:\Sikuli\Tests\A.sikuli But in this case just the regular IDE GUI opens. I guess I am doing something wrong. Any idea what? Thanks in advance! Eugene -- You received this question notification because you are a member of Sikuli Drivers, which 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