Re: [Sikuli-driver] [Question #272460]: detecting colors
Question #272460 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272460 Status: Open => Answered Eugene Maslov proposed the following answer: Hello Entity, I can help with distinguishing the colors. My findWithColor procedure finds an image with at least one pixel of exact color in the probe rectangle inside the image. So you may set, for example, gray target color for disabled menus and black color for active menus. Debug mode allows seeing in the output the colors to select the target from. import java.awt.Robot as jRobot import java.awt.Color as Color from sikuli import * class RegionM(Region): def findWithColor(self, img, color=Color(255,255,255), probe=[0,0,1,1],debug=False): #probe=[top,left,width,height,0] from topleft myRobot=jRobot() res=False found=self.findAll(img) if not found: return False foundcolor=False for but in found: for myy in range(but.getTopLeft().y+probe[1],but.getTopLeft().y+probe[1]+probe[3]): for myx in range(but.getTopLeft().x+probe[0],but.getTopLeft().x+probe[0]+probe[2]): myColor=myRobot.getPixelColor(myx, myy) if debug: print "color at "+str(myx)+":" +str(myy)+":",myColor if myColor==color: foundcolor=True res=but if not debug: break if foundcolor: if not debug: break if foundcolor: if not debug: break return(res) #usage: myreg=RegionM(SCREEN).findWithColor("ie1.png", color=Color(240,240,231), probe=[1,1,2,2], debug=True) #then set debug=False mouseMove(myreg) This piece of code is a part of an extended RegionM object, that I use for for simplicity of scripts. Please just remove the object notation if you don't need it. And, partially concerning the other question, as far as I tried before, there is no sense to make whole background or foreground of letters transparent: then solid areas, filled with a color similar to remaining non-transparent color, are selected instead of the letters. -- 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 #271257]: I am not finding the right solution for my code
Question #271257 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/271257 Status: Open => Answered Eugene Maslov proposed the following answer: Try setting Settings.MinSimilarity=0.99 or 1.0 at the beginning of your script. Probably there are two similar animals on your page. I use Sikuli 1.1.0 from sikulix.com , but the version unlikely affect 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 #271312]: Compile Individual lines
Question #271312 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/271312 Eugene Maslov posted a new comment: Hi Jesus, Just a suggestion of a trick. To debug single lines, or the bottom of broken test, I write at the beginning of the script: if False: pass # then all the script code goes click("a.png") click("b.png") When the code fails with an error, I select the code above the failed line and indent it all to the right with "tab" key, so that the script would start from the failed line and from the state of the tested application that it was just stopped. After debugging, I unindent it all back with shift+tab. It's easier than debugging as a different file, because captured images are saved directly into the folder of the script, without the need of copying. -- 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 #271257]: I am not finding the right solution for my code
Question #271257 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/271257 Eugene Maslov proposed the following answer: Try also highlighting to see the details. And wait(1) after page-down will help avoiding confusions if the browser scrolls the site smoothly and the image is captured during scrolling. notFound=True while not exists("PrivacyPolic.png"): #bottom of the page type(Key.PAGE_DOWN) wait(1) target=exists("Albatross.png",0) if target: #in order to locate an image target.highlight(2) popup("Hurray!") notFound = False break if notFound: popup("OMG") -- 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 #271257]: I am not finding the right solution for my code
Question #271257 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/271257 Eugene Maslov posted a new comment: Really tried my code??? There are no page-downs in it. The output is 27 lines "[log] TYPE "#DOWN."", then "Hurray" box appears when "Create bug report" link appears at the bottom. -- 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 #271257]: I am not finding the right solution for my code
Question #271257 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/271257 Status: Open => Answered Eugene Maslov proposed the following answer: A trick promoting web sites? It works on my Chrome without problems on the page of this question , I just unindented the last if. notFound=True while not exists("Takethetour-2.png"): #bottom of the page type(Key.DOWN) if exists("Createbugrep.png"): #in order to locate an image popup("Hurray!") notFound = False break if notFound: popup("OMG") -- 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 #270546]: Comparing texts between 2 versions of my application
Question #270546 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/270546 Eugene Maslov proposed the following answer: Well, compare the tables with Python cell by cell. content1 = open('d:/file1.txt', 'r').readlines() content2 = open('d:/file2.txt', 'r').readlines() different=0 for ln in range(len(content1)): cells1=content1[ln].split() cells2=content2[ln].split() for cell in range(len(cells1)): if cells1[cell]cells2[cell]: different+=1 print cell +str(ln)+:+str(ln)+ is different There is no need to use Sikuli functions for that. Sikuli just conveniently extends the power of Python (or another applicable language), making it able to see the screen and to act like a real user. -- 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 #270546]: Comparing texts between 2 versions of my application
Question #270546 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/270546 Eugene Maslov proposed the following answer: The files can be compared with Python features, there is no need to call Sikuli functions for that. content1 = open('d:/file1.txt', 'r').read() content2 = open('d:/file2.txt', 'r').read() if content1==content2: print the same else: print different -- 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 #270543]: Running tests with multiple sets of data
Question #270543 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/270543 Eugene Maslov proposed the following answer: Hi Sahil, I run data driven tests with python unittest. It's possible to modify __init__ procedure of the test template, that all the tests are derived from, in a way to accept parameters, and then write a hub python script which adds the test cases to the test suite with these parameters, including calling same test cases with different data sets if you want. Something like that. = test template sample: class testbase(unittest.TestCase): def __init__(self,*args): self.testname=args[0] super(testbase, self).__init__(self.testname) #get parameters of the current run, coming from start.py script: self.cleansettings=args[1] self.start=args[2] self.kill=args[3] self.apptype=args[4] def setUp(self): pass def tearDown(self): pass = test case sample: class myapp_001(testbase.testbase): def test_001(self): if self.start==start: SCREEN.click() = The following lines add tests to test suite in the hub start.py script ('clean','start', etc. are options of the test execution, which may contain necessary data that you want): thesuite=unittest.TestSuite() thesuite.addTest(myapp_001(test_001,'clean','start','nokill','wide')) thesuite.addTest(myapp_001(test_001,'noclean','start','kill','narrow')) fp=file('c:/temp/result.html','wb') runner=HTMLTestRunner.HTMLTestRunner(stream=fp,title=' My auto tests',description='My auto tests') runner.run(thesuite) fp.close() = -- 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 #270186]: Linux highlight
Question #270186 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/270186 Eugene Maslov proposed the following answer: Hi, I use under Linux the following function. Also it often helps to avoid problems under Windows, because highlight() always kills extended menus under Windows. def showByMouse(reg): hover(reg.getTopLeft()) hover(reg.getTopRight()) hover(reg.getBottomRight()) hover(reg.getBottomLeft()) hover(reg.getTopLeft()) showByMouse(Region(10,10,100,100)) -- 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 #269702]: Sikuli not pausing the script
Question #269702 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/269702 Status: Open = Answered Eugene Maslov proposed the following answer: I haven't this problem. My start script is similar, though not importing time module, as Sikuli imports it itself. I tried to put at the beginning: popup(start) wait(120) popup(after 120 sec) Starting from both IDE and the command line, the script waits exactly 2 minutes between the dialog boxes and then goes ahead. The same without the dialogs. Windows 7, SikulixIDE 1.1.0 (2015-07-07), Java SE Runtime Environment (build 1.7.0_45-b18) -- 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] [Bug 1428110] Re: [1.1.0] Windows 7 64: Java 8-31: crashes with insufficient memory after longer run (40 min here)
After registering ths issue, I found two things: - If Java dies on long unittest test suite, division of the large suite into several smaller suites helps. The common start python script should create and execute them consequently. - With new Java 8 versions, available at java.com now (e.g. 8.45), those crashes after 40 minutes are no longer reproduced. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1428110 Title: [1.1.0] Windows 7 64: Java 8-31: crashes with insufficient memory after longer run (40 min here) Status in Sikuli: In Progress Bug description: * workaround: use Java 7 -- reported by: https://launchpad.net/~emaslov1 I have 4-hour sequence of about 50 Sikuli tests, driven by Python Unittest from command line, running well for last half of year. Having got new Windows 7 64 bit machine, I copied there the whole Sikuli stuff, and then installed the last Java (8.31) from java.com . Now it's difficult to find old Java there... Sikuli seemed to start working well, and IDE worked well with separate scripts, but, trying to run the whole sequence, Java crashed after five or six tests (40 min), with Windows crash message box, because of insufficient memory for it. Extending the memory limit in runsikulix.cmd had no effect at all. The problem was finally solved with installation of older Java (7.67) Java 8 seems to have some problems. To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1428110/+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 #269065]: Unable to compare Expected SS to Actual Output
Question #269065 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/269065 Eugene Maslov posted a new comment: Justin, the magic help tool is Google. If a problem is solvable, Sikuli examples are usually present in the web, e.g. sikuli java exists image not found, or a similar phrase, returns the examples, e.g. https://answers.launchpad.net/sikuli/+question/146397 . -- 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 #269065]: Unable to compare Expected SS to Actual Output
Question #269065 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/269065 Status: Open = Answered Eugene Maslov proposed the following answer: 95 is wrong. found=reg.exists(Pattern(myimage.png).similar(0.95),1) if found: print match else: print no match -- 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 #268798]: sleep interrupted exception
Question #268798 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/268798 Eugene Maslov posted a new comment: However, some applications draw the cursor themselves over some of their graphical viewers etc. Press PrintScreen key and paste the image somewhere. If it's the case, the cursor will be present in the picture. -- 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 #268536]: image click on multiple appearances
Question #268536 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/268536 Status: Open = Answered Eugene Maslov proposed the following answer: Hi Alias, I suggest, using observe functions is better in your case: ===8=== myGame=Region(0,0,800,600) def myChange(event, region=myGame): myattack=region.exists(attack.png,1) mycontinue=region.exists(continue.png,1) if myattack is not None: myattack.click() elif mycontinue is not None: mycontinue.click() else: myrestart=region.exists(restart.png,1) myrestart.click() myGame.onChange(50,myChange) myGame.observe(30,False) ===8== For other click logic, modify if-else conditions in myChange procedure. -- 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 #268536]: image click on multiple appearances
Question #268536 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/268536 Eugene Maslov posted a new comment: Sorry, mistyped, a little correction. Zero should be used with exists for quicker search, like that: region.exists(attack.png,0) -- 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 #268536]: image click on multiple appearances
Question #268536 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/268536 Eugene Maslov proposed the following answer: Hi Alias, I suggest, using observe functions is better in your case: ===8=== myGame=Region(0,0,800,600) def myChange(event, region=myGame): myattack=region.exists(attack.png,0) mycontinue=region.exists(continue.png,0) if myattack is not None: myattack.click() elif mycontinue is not None: mycontinue.click() else: myrestart=region.exists(restart.png,0) myrestart.click() myGame.onChange(50,myChange) myGame.observe(30,False) ===8== For other click logic, modify if-else conditions in myChange procedure. -- 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 #268536]: image click on multiple appearances
Question #268536 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/268536 Eugene Maslov proposed the following answer: A quicker one: myGame=Region(0,0,800,600) def myChange(event, region=myGame): myattack=region.exists(attack.png,0) if myattack is not None: myattack.click() else: mycontinue=region.exists(continue.png,0) if mycontinue is not None: mycontinue.click() else: myrestart=region.exists(restart.png,0) myrestart.click() myGame.onChange(50,myChange) myGame.observe(30,False) -- 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 #267553]: Run Sikuli Script using Windows Task Scheduler in Windows 7
Question #267553 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/267553 Status: Open = Answered Eugene Maslov proposed the following answer: skish, If nothing happens before the window is closed, it can mean that something is wrong in the mytests.sikuli script and it dies with an error, or some other error occurs. run cmd from start menu and put there concatenated command c:\Sikuli\runsikulix.cmd -r c:\sikuli_tests\mytests.sikuli cmd will write what's wrong there. -- 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 #267553]: Run Sikuli Script using Windows Task Scheduler in Windows 7
Question #267553 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/267553 Status: Open = Answered Eugene Maslov proposed the following answer: Hi suba, I use 1.1.0, but, as far as I recall, it works the same, just start file name is different. Suppose there is the test script at c:\sikuli_tests\mytests.sikuli . Call the scheduler Task scheduler library item in the tree - call popup, click create task General tab - fill name and description Triggers tab - click New, fill the schedule Actions tab - click New, - Program/script: type like c:\Sikuli\runsikulix.cmd (runscript.cmd for 1.0.1 ) - Add Arguments: type the parameters that you want, e.g. -r c:\sikuli_tests\mytests.sikuli -d 1 -f d:\temp\sikuli.log --args -u inch -t test_002 (test parameters, if any needed, after --args, like -u, -t, etc., should be parsed by mytests.sikuli, maybe using argparse module or like that) Click OK in the task creation dialog. -- 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 #267224]: Mouse pointer not being displayed in during .hover() usage
Question #267224 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/267224 Eugene Maslov proposed the following answer: I tried recording of hover() from IDE under Win 7-64 bit with VirtualDub , it worked properly there when capture mouse pointer checkbox was activated in VirtualDub. So it's probably some problem of OS X or Quicktime. -- 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] [Bug 1457104] Re: [1.1.0] Jython: Windows: getBundlePath: Leading slash in paths not accepted --- fixed 2015-05-21+
I confirm that the issue is fixed in SikuliX 1.1.0 (2015-05-21) Printing: D:/Sikuli/CP2D.N/trytest.sikuli True D:/Sikuli/CP2D.N True Thank you, Raimund! -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1457104 Title: [1.1.0] Jython: Windows: getBundlePath: Leading slash in paths not accepted --- fixed 2015-05-21+ Status in Sikuli: Fix Committed Bug description: Windows 7-64, Java SE RTE 1.7.0_45, SikuliX 1.1.0 (2015-05-20) testbundle=getBundlePath() print testbundle print os.path.isdir(testbundle) dirn=os.path.dirname(testbundle) print dirn print os.path.isdir(dirn) Printed result: /D:/Sikuli/CP2D.N/trytest.sikuli False /D:/Sikuli/CP2D.N False There are leading slashes, which seem to prevent finding the paths in the file system. In version SikuliX 1.1.0 2014_09_18, the paths were printed without the leading slashes and were recognized well as directories. To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1457104/+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
[Sikuli-driver] [Bug 1457104] [NEW] Leading slash in paths
Public bug reported: Windows 7-64, Java SE RTE 1.7.0_45, SikuliX 1.1.0 (2015-05-20) testbundle=getBundlePath() print testbundle print os.path.isdir(testbundle) dirn=os.path.dirname(testbundle) print dirn print os.path.isdir(dirn) Printed result: /D:/Sikuli/CP2D.N/trytest.sikuli False /D:/Sikuli/CP2D.N False There are leading slashes, which seem to prevent finding the paths in the file system. In version SikuliX 1.1.0 2014_09_18, the paths were printed without the leading slashes and were recognized well as directories. ** Affects: sikuli Importance: Undecided Status: New -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1457104 Title: Leading slash in paths Status in Sikuli: New Bug description: Windows 7-64, Java SE RTE 1.7.0_45, SikuliX 1.1.0 (2015-05-20) testbundle=getBundlePath() print testbundle print os.path.isdir(testbundle) dirn=os.path.dirname(testbundle) print dirn print os.path.isdir(dirn) Printed result: /D:/Sikuli/CP2D.N/trytest.sikuli False /D:/Sikuli/CP2D.N False There are leading slashes, which seem to prevent finding the paths in the file system. In version SikuliX 1.1.0 2014_09_18, the paths were printed without the leading slashes and were recognized well as directories. To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1457104/+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
[Sikuli-driver] [Bug 1455812] Re: [1.1.0] IDE hangup, recording an image to an array --- fixed 2015-05-18+
I confirm the fix in today's version. Thank you, Raimund! -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1455812 Title: [1.1.0] IDE hangup, recording an image to an array --- fixed 2015-05-18+ Status in Sikuli: Fix Committed Bug description: There is a small Python file with one line: btn_start=[btn_start1_1.png] IDE is set to ask manual typing the image name. Trying to record the second screenshot in IDE: put a comma after the first image name: btn_start=[btn_start1_1.png, ] put the cursor after the comma, then click Take screenshot, select again some region on the screen, e.g. Start button. Result: IDE hangs up, the dialog of image naming does not appear, killing is needed. Quite blocking for me, as I use many such arrays for alternative images search in flexible user interfaces. Earlier IDE versions did not hang up, at least 1.1.0 from 18.09.2014 which I used before for long time. both on Windows XP (Java SE RTE 1.7.0_60) and Win 7-64 (Java SE RTE 1.7.0_67-b01) Fresh version 1.1.0 2015-05-16 To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1455812/+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
[Sikuli-driver] [Bug 1455812] [NEW] IDE hangup, recording an image to an array
Public bug reported: There is a small Python file with one line: btn_start=[btn_start1_1.png] IDE is set to ask manual typing the image name. Trying to record the second screenshot in IDE: put a comma after the first image name: btn_start=[btn_start1_1.png, ] put the cursor after the comma, then click Take screenshot, select again some region on the screen, e.g. Start button. Result: IDE hangs up, the dialog of image naming does not appear, killing is needed. Quite blocking for me, as I use many such arrays for alternative images search in flexible user interfaces. Earlier IDE versions did not hang up, at least 1.1.0 from 18.09.2014 which I used before for long time. both on Windows XP (Java SE RTE 1.7.0_60) and Win 7-64 (Java SE RTE 1.7.0_67-b01) Fresh version 1.1.0 2015-05-16 ** Affects: sikuli Importance: Undecided Status: New -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1455812 Title: IDE hangup, recording an image to an array Status in Sikuli: New Bug description: There is a small Python file with one line: btn_start=[btn_start1_1.png] IDE is set to ask manual typing the image name. Trying to record the second screenshot in IDE: put a comma after the first image name: btn_start=[btn_start1_1.png, ] put the cursor after the comma, then click Take screenshot, select again some region on the screen, e.g. Start button. Result: IDE hangs up, the dialog of image naming does not appear, killing is needed. Quite blocking for me, as I use many such arrays for alternative images search in flexible user interfaces. Earlier IDE versions did not hang up, at least 1.1.0 from 18.09.2014 which I used before for long time. both on Windows XP (Java SE RTE 1.7.0_60) and Win 7-64 (Java SE RTE 1.7.0_67-b01) Fresh version 1.1.0 2015-05-16 To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1455812/+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 #264648]: myapp.close() does not work
Question #264648 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/264648 Eugene Maslov proposed the following answer: To make sure that the application is killed, Windows taskkill is possible: os.system(taskkill /f /im firefox.exe) -- 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] [Bug 1434434] Re: [request] want a workflow recording tool with support for runtime adjustments to the workflow
@Raimund and Denis, May I put some thoughts about the Recorder that I collected during the last years. I deal mostly with GUI auto tests, where maintainability of many tests is one of the main factors, therefore I always have to store common things in common places, not in test scripts themselves. So this is the recording scenario that I imagine. - The user has all his existing screenshots of buttons etc. at, e.g., guimap.sikuli folder. - If multiple image search is used, the folder contains also guimap.py file, describing the arrays of images as variables, like that: menu_file=menu_file.png button_ok=[button_ok.png,button_ok_highlighted.png] #(referred below as image group) - The user activates the recording mode. - Clicks, key presses, etc. are recorded to the script as Denis already described - When the user clicks on some control, the Recorder: --Gets some area around the mouse --Takes, one by one, all images fom guimap.sikuli folder, and checks whether one of them exists in the area around the mouse --As soon as the image is found, the name of the image (or, even better, the name of variable containing this image) is put to the script, like that: Click(button_ok) # or Click(self.button_ok), depending on the object/non-object test structure --If none of the images fit, the Recorder proposes the user to crop, to name, and to add the new image to some image group, and then stores the image at guimap.sikuli and, desirably, adds the name to guimap.py It's much better if the Recorder takes the image not from the existing screen, which contains highlighted image, but from (or also from) the screen which existed a few seconds before, where the element was intact. For that, it's just necessary to remember a few screens for the last seconds and select the image before the last change of the screen. To get the basis for setting spatial relations, it will be very desirable to get the screenshots not only on clicks etc., but also on mouse hovers, without clicks, inserting find() in the script. For that, the user can press some key instead of the mouse, for example, F12 or like that. With this trick, the user will be able to make an anchor, e.g. find a label to find the check box at the left of it. The sense of the anchor can be so far set manually, editing the script. Best regards Eugene -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1434434 Title: [request] want a workflow recording tool with support for runtime adjustments to the workflow Status in Sikuli: In Progress Bug description: Hi guys! @RaiMan, could you kindly advise me if you have done a script recording tool? If you haven't, would you be interested in my one? It some kind of floating panel with two buttons Record and Stop, that can capture pictures and write your typing. Output is simply set of commands, for example: s.click(c:\\tmp\\myimgs\\PREF_20150320130001.PNG); s.type(H); s.type(e); s.type(l); s.type(l); s.type(o); s.type( ); s.type(g); s.type(u); s.type(y); s.type(s); s.type(!); s.type(Key.ENTER); You can copy them and past to your code. Probably, I or someone else could develop a plugin for eclipse in the future that will input the commands directly to your code. By now, it will be an AWT application. The main advantage of the tool is to reduce necessity to make pictures manually and link them to the commands, the tool does it for you. I could also make an youtube video. So, let me know if you need so. Thanks! To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1434434/+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 #263891]: Scripts recording tool do you need one?
Question #263891 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/263891 Eugene Maslov posted a new comment: Hi all, I have been using for several years a recorder which captures the images and puts the actions into the workflow, but finally I found that typing scripts by hands in Sikuli is more efficient, because: 1. Buttons and other screen elements almost always get highlighted and become different when the mouse is over them. Moreover, in most remote desktops, the mouse is drawn on the screenshots. Therefore the recorded images are too often useless for playback with search of the images on the screen. 2. Even if not highlighted, the images are captured without any sense, named mostly by time, and placed into the scripts by their names. When you have several dozens of test scripts, the system becomes non-maintainable: when programmers change an icon on one button, you have to update manually every script. It's even often easier to record them again than to update. The problem can be solved if you have GUI map of common images and provide that the scripts refer to the same images when you click them during the record, but it will require image recognition capability from the recorder, that can really become a large task. Instead, if you write the script manually, you can do it easily, so that you can change only one image when something changes in the tested application. 3. Manually you write clever scripts, finding screen contents by relative positions with left(), above() etc., so that the scripts survive future GUI changes occurring during software development. But with the automatic recorder, it's quite difficult to provide that it understands what spatial relations you mean. It's still possible to record the actions and them to edit the script manually, inserting necessary logics, but in this case the recording itself does not save significant time. So, I suggest, writing a practically useful recorder can require much more work than it seems initially. -- 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 #263287]: Best way to read a combobox, or any other control with unselectable content
Question #263287 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/263287 Eugene Maslov posted a new comment: @Eugene S It's slower than search of one simple image, but not really too slow. The following problems can slow it down: - Old Sikuli 1.0.0 - it couldn't reduce AutoWaitTimeout less than 0.3 sec, in 1.1.0 it's well solved. - Many words in the screen, having the same beginning: it has to check many times many items and removes wrong ones from consideration quite late, so the search time increases. In this case, e.g. if many words are sorted alphabetically, it's better to start checking from the end of the string. - Words starting from I, 1, or l : findAll understands some long vertical line as many first symbols, and then the check of second symbols takes long. - Low similarity used. If it's 0.7 or less, the first pass takes too many items, and then the items are removed at longer stages because of false positive detections, therefore the time grows. I usually use 0.85-0.95 for characters and 0.99 for the space, it works well if the background is the same as in the screenshots of the characters. If different background requires reducing the similarity, then yes, then the time will grow. I understood that Edmundo has just a few list boxes in the screen. I also usually work with screens where the text is not very dense - just textual items, menus, popups and buttons... But if there is a full page of small text, like in a book, then, I think, having found many first letters, the procedure can search for necessary string much longer than just a ready screenshot of a word. -- 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 #263287]: Best way to read a combobox, or any other control with unselectable content
Question #263287 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/263287 Eugene Maslov proposed the following answer: Edmundo, It's possible to write your own text recognizer with Sikuli and teach it yourself. Make little screenshots of your letters without left and right margins, and write some code transferring the characters into png file names, e.g. b:b.png, B:b_up.png, ::colon.png, :space.png ... Take the string you want to find. findAll the first character of the string and put it into an array A of small regions. Then, with each of the found regions, offset to the right for a distance a bit greater than the next letter, plus extend a bit up and down, and try to find there the second character. If not found - remove the item from A array of found items. But if it's found, then fix new right border of found region, it will be the basis for the next offset. Then make again the offset to the right for third, fourth etc. characters, removing items where the last character is not found. By the end of the string, you will have your string found on the screen. Before this procedure, set AutoWaitTimeot to zero, else the search will be slow. I use such one, it is quite reliable. -- 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 #263194]: Java 8 memory problem
New question #263194 on Sikuli: https://answers.launchpad.net/sikuli/+question/263194 Hello all, Not a question, I just hope it's useful info. Sikuli 1.1.0. I have 4-hour sequence of about 50 Sikuli tests, driven by Python Unittest from command line, running well for last half of year. Having got new Windows 7 64 bit machine, I copied there the whole Sikuli stuff, and then installed the last Java (8.31) from java.com . Now it's difficult to find old Java there... Sikuli seemed to start working well, and IDE worked well with separate scripts, but, trying to run the whole sequence, Java crashed after five or six tests (40 min), with Windows crash message box, because of insufficient memory for it. Extending the memory limit in runsikulix.cmd had no effect at all. The problem was finally solved with installation of older Java (7.67) Java 8 seems to have some problems. -- 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 #263194]: [1.1.0] Win 7 64: Java 8 memory problem
Question #263194 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/263194 Status: Answered = Solved Eugene Maslov confirmed that the question is solved: Solved. Raimund, thanks a lot for Sikuli. -- 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 #262429]: help with storing highlighted text in linux as variable
Question #262429 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/262429 Eugene Maslov posted a new comment: I tried the middle click with Sikuli on Debian 6, it works properly. -- 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 #262339]: Compare two image excluding the particular region
Question #262339 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/262339 Eugene Maslov proposed the following answer: Raimund, I also sometimes feel the need in this feature. For example, recognizing some characters in a dense string, adjacent characters intrude from the sides and prevent the recognition. In another case, the mouse, displayed in OpenGL viewer, moves a couple of pixels from time to time and warns that the images are different. I crop png's to exclude the mouse, but sometimes the mouse is in the middle and it is impossible. I'd suggest to consider some particular color in png as transparent during the image comparison. The user would fill in png the areas, that he wants to exclude, with this color. -- 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 #261614]: Clicking on submenu item changes menu
Question #261614 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/261614 Eugene Maslov proposed the following answer: To prevent menu disappearing, move the mouse right, then down. The function below can help. def clickOrtho(img): start=Env.getMouseLocation() end=find(img).getCenter() mouseMove(Location(end.x,start.y)) mouseMove(Location(end.x,end.y)) click(end) return end #usage: e.g. menu View-Zoom-Reset of Firefox click(menu_view.png) click(menu_zoom.png) clickOrtho(menu_reset.png) -- 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 #259577]: Is there a way to discard the background while image compareing
Question #259577 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259577 Eugene Maslov proposed the following answer: @Anunaya If the icons are semi-transparent, so that cropping doesn't help, it's still possible to make several screenshots of the icons for each background and send it to a function selecting the best of them. I mostly use this way for blinking buttons, which change their color with time. It can be like that: def findAny(thelist, theregion=SCREEN, timeout=False): if not timeout: timeout=theregion.getAutoWaitTimeout() res=None i=0 for s in thelist: if i==0: t=timeout else: t=0 found=theregion.exists(s,t) i+=1 if found: res=found break return res #usage: thereg=Region(324,321,648,429) findAny([btn_bg1.png,btn_bg2.png,btn_bg3.png], thereg,timeout=20).click() -- 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 #259577]: Is there a way to discard the background while image compareing
Question #259577 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259577 Eugene Maslov proposed the following answer: Sorry, this corrected function processes second image in the list quicker. Please discard the code in the answer #2. import time def findAny(thelist, theregion=SCREEN, timeout=False): if not timeout: timeout=theregion.getAutoWaitTimeout() res=None start_time=time.time() exit_time=start_time+timeout while time.time()=exit_time: for s in thelist: found=theregion.exists(s,0) if found: res=found break if res: break return res #usage: thereg=Region(324,321,648,429) findAny([btn_bg1.png,btn_bg2.png,btn_bg3.png], thereg,timeout=20).click() -- 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 #259550]: issue in comparing two images
Question #259550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259550 Eugene Maslov posted a new comment: Raimund, by the way, in the script from #6 http://www.hohmodrom.ru/upload/3/projimg/125631/files/color_confusion.gif if I reduce MinSimilarity to 0.9, so that the script passes ok, then increase to 1.00 and run again in the same IDE, it continues to run successfully. Build 2014-09-18. -- 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 #259550]: issue in comparing two images
Question #259550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259550 Eugene Maslov proposed the following answer: Sepid, take a look what I found . Your case is a strange one when two images look the same as a whole: probably, the total sum of differences returns zero diff number on average. But the images are found different in their parts! I cropped your image to the little key area of interest, and the difference will be detected quite reliably, even if similarity is reduced to 0.97. I executed the following script over your red image, displayed in the screen: http://www.hohmodrom.ru/upload/3/projimg/125631/files/color_confusion.gif step 3 mistakenly passed... but step 9 correctly failed! :) Thus, cropping the reference images, it's possible to catch the difference :) -- 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 #259550]: issue in comparing two images
Question #259550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259550 Eugene Maslov proposed the following answer: Raimund, I meant above that I heard that something in Java can deal with exact colors. I just didn't know that jRobot is accessible from Python. So now I solved my problem with pressed/released buttons, measuring the color inside the glyphs with jRobot. import java.awt.Robot as jRobot import java.awt.Color as Color def findWithColor(img, reg=SCREEN, color=Color(255,255,255), probe=[0,0], debug=False): myRobot=jRobot() res=None reg.findAll(img) found=list(reg.getLastMatches()) for but in found: probePoint=but.getCenter().offset(probe[0],probe[1]) myColor=myRobot.getPixelColor(probePoint.x, probePoint.y) if debug: print color at +str(probePoint.x)+: +str(probePoint.y)+:,myColor if myColor==color: res=but if not debug: break return(res) Settings.MinSimilarity=0.85 #Stable click on grayed button: findWithColor(unpressed.png,color=Color(204,219,233), probe=[2,2], debug=True).click() #Stable click on white button findWithColor(unpressed.png,color=Color(255,255,255)).click() Thank you very much for the suggestions. -- 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 #259550]: issue in comparing two images
Question #259550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259550 Eugene Maslov posted a new comment: Raimund, I also have sometimes a problem that Sikuli Python scripts don't distinguish between glyphs on pressed and released toggle buttons, even if 1.00 MinSimilarity is set. For example, two icons are the same for Sikuli: http://www.hohmodrom.ru/upload/3/projimg/125631/files/toggled.png Settings.MinSimilarity=1 click(unpressed.png) click(pressed.png) I understand that color-insensitive mode is good and it solves a lot of problems with random pixel differences in the images, but sometimes color-strict flag would be really useful. I heard that in Java API it's already solved, so the implementation for Python would be really nice. -- 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 #259459]: How to overcome the screen resolution issue or browser issues.
Question #259459 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259459 Status: Open = Answered Eugene Maslov proposed the following answer: Hi Atul, I solved the resolution problem with a small python function finding one image from a list like [img1.png, img2.png] in the region. New image should be added for each resolution. -- 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 #259504]: get previous date
Question #259504 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259504 Status: Open = Answered Eugene Maslov proposed the following answer: Hi, import datetime td= datetime.datetime.now() + datetime.timedelta(days=-1) print td.strftime(%d.%m.%Y %H:%M:%S) -- 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 #259459]: How to overcome the screen resolution issue or browser issues.
Question #259459 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259459 Status: Open = Answered Eugene Maslov proposed the following answer: Don't replace, add new ones. Don't screenshot the images again. Scale your available png-s in batch mode with IrfanView or like that. -- 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 #259459]: How to overcome the screen resolution issue or browser issues.
Question #259459 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259459 Eugene Maslov posted a new comment: IrfanView, a free image processor that I usually use, can take a list of image files and modify them all with the same rule, for example resize, and put the resulting files to another folder with the same or modified names. If your tested application scales the images when the resolution change, you can resize the images and use them instead or together with your initial images. Frankly, with the types of applications that I have to test, I have scale problems with change of resolution quite rarely. Almost always Sikuli finds the icons and buttons successfully with any resolution, as they are the same for it in pixels. -- 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 #258628]: Placing Sikuli script in a queue
Question #258628 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/258628 Eugene Maslov posted a new comment: Dear Raimund, Creating the structure of files, which can run the tests in an unittest queue, is not simple from scratch, especially if the user has to transfer parameters. I suggest, it would be fine to have some little official archive of sikuli files with the simple sample of a queued test. For example: - start.sikuli hub script, receiving some general parameters from the command line, collecting the suite of tests with their own parameters, and running it with HTMLTestRunner; - tempate.sikuli containing __init__ with parsing coming parameters , some setUp, and some tearDown - test.sikuli containing __init__ procedure to process coming parameters, some simple test itself, and __name__=='__main__' block at the bottom, allowing to debug the test from Sikuli IDE when necessary. This tiny archive would save huge time of people getting familiar with Sikuli, because normally it's really difficult for testers to write this object-oriented skeleton. -- 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 #194144]: How to make exists(img, 0.01) return immediately even if it fails --- solution: Settings.WaitScanRate
Question #194144 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/194144 Eugene Maslov posted a new comment: Raimund, I still face this problem, and it is reproduced in both 1.0.1 and the last version rc3 Recognizing unrecognizable texts, I need quick response about missing images, searching quickly in very small regions (10x20px in 80x30px), I hope it should not cause hardware performance problems even with high scan rates. Nevertheless, nothing helps to reduce negative response time to less than 0.3 sec, while positive response is returned within 0.02 sec. It extends the whole processes to dozens of seconds. AutoWaitTimeout, ObserveScanRate, WaitScanRate parameters seem to help to reduce to 0.3 sec, but not less. This is the sample: (menu_modify.png is a small screenshot of Modify main menu of any program, M.png, o, d.png are just tiny characters cut out from it . I don't know how to attach them to this message. Before start, I open menu_modify.png in any image editor) import time oldsim=Settings.MinSimilarity smallArea=SCREEN.find(menu_modify.png) smallArea.highlight(2) oldtimeout=smallArea.getAutoWaitTimeout() oldrateO=Settings.ObserveScanRate oldrateW=Settings.WaitScanRate for i in Modus: tofind=i+.png Settings.MinSimilarity=0.95 smallArea.setAutoWaitTimeout(0.01) Settings.ObserveScanRate=100 Settings.WaitScanRate=100 starttime=time.time() if smallArea.exists(tofind) is not None: print i+ found else: print i+ not found print elapsed for +i+ : + str(time.time()-starttime) Settings.WaitScanRate=oldrateW Settings.ObserveScanRate=oldrateO smallArea.setAutoWaitTimeout(oldtimeout) Settings.MinSimilarity=oldsim This is the printed output: M found elapsed for M : 0.0099046326 o found elapsed for o : 0.0099046326 d found elapsed for d : 0.019809265 u not found elapsed for u : 0.3155722 s not found elapsed for s : 0.3155722 Are there any more parameters, allowing to reduce the time of negative exists() response? -- 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 #194144]: How to make exists(img, 0.01) return immediately even if it fails --- solution: Settings.WaitScanRate
Question #194144 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/194144 Eugene Maslov posted a new comment: Thank you Raimund, it really works there. -- 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 #246176]: Making an image from text
New question #246176 on Sikuli: https://answers.launchpad.net/sikuli/+question/246176 First of all, Raimund, thank you for the great product. Now, this is my question. I was trying to run the same Sikuli tests with the same application on different Linux machines, and they failed too often, because fonts, used in menus of tested aplications, were different. It was quite tricky to set the same fonts on the machines, because in different Linux there are different ways, and I couldn't make a common script to do it automatically. Usage of OCR is too slow and buggy, every third menu item is not recognized, and small fonts are not recognized at all. Therefore I started trying to write a function to generate on-the-fly little png images containing known text with known font, in order to use them like click(text2img(text,font, background, foreground)) . I expected that such images would be found more quickly and reliably, not needing OCR, and it would be possible to configure the font only once at the beginning of the test run. But... - PIL python image library refuses to be installed on my machine with Sikuli, because it doesn't recognize Jython as Python, it just interrupts the installation; - When I put ImageJ on the machine tried, like here http://imagej.nih.gov/ij/plugins/jython/ (tried on Windows) , sys.path.append(d:/ImageJ/) from ij import IJ Then Sikuli writes: [error] ImportError ( No module named ij ) Now I was forced to come to an idea to write an independent exe with OpenCV, returning such images, but I still feel that I missed some simpler way. Dear colleagues, could you please help: is there a simple way to make images from a text and a font with existing configuration of Sikuli? Thank you 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
[Sikuli-driver] [Bug 1271463] [NEW] IDE: menuShowThumbs truncates image paths
Public bug reported: Sikuli IDE 1.0.1 Windows XP 32 bit I had in Jython code an image from alien folder, and it seemed to work well during execution: mywin.find(w:\\v15\\but8.png).click() After switching IDE menu View-menuShowThumbs on and off, the path is reduced to but8.png, where the image doesn't exist. mywin.find(but8.png).click() It would be useful to keep the whole path to the image, sometimes the location is important. ** Affects: sikuli Importance: Undecided Status: New -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1271463 Title: IDE: menuShowThumbs truncates image paths Status in Sikuli: New Bug description: Sikuli IDE 1.0.1 Windows XP 32 bit I had in Jython code an image from alien folder, and it seemed to work well during execution: mywin.find(w:\\v15\\but8.png).click() After switching IDE menu View-menuShowThumbs on and off, the path is reduced to but8.png, where the image doesn't exist. mywin.find(but8.png).click() It would be useful to keep the whole path to the image, sometimes the location is important. To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1271463/+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
[Sikuli-driver] [Bug 1271463] Re: IDE: menuShowThumbs truncates image paths
Raimund, thanks for your suggestion for click(). [debug (1/17/14 6:54:50 PM)] RunSetup: SikuliX Setup Build: 1.0.1 12NOV201312 I took it last week from https://launchpad.net/sikuli/+download , and downloaded other jars to my Downloads folder from https://launchpad.net/raiman/+download (1.0.1 release), because setup with sikuli-setup.jar was blocked by proxy at my side. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1271463 Title: IDE: menuShowThumbs truncates image paths Status in Sikuli: New Bug description: Sikuli IDE 1.0.1 Windows XP 32 bit I had in Jython code an image from alien folder, and it seemed to work well during execution: mywin.find(w:\\v15\\but8.png).click() After switching IDE menu View-menuShowThumbs on and off, the path is reduced to but8.png, where the image doesn't exist. mywin.find(but8.png).click() It would be useful to keep the whole path to the image, sometimes the location is important. To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1271463/+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
[Sikuli-driver] [Bug 1271463] Re: IDE: menuShowThumbs truncates image paths
Sorry, now found in Sikuli IDE About window: Sikuli IDE 1.0.1 November 2013 Build: 12SEP2013160242 -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1271463 Title: IDE: menuShowThumbs truncates image paths Status in Sikuli: New Bug description: Sikuli IDE 1.0.1 Windows XP 32 bit I had in Jython code an image from alien folder, and it seemed to work well during execution: mywin.find(w:\\v15\\but8.png).click() After switching IDE menu View-menuShowThumbs on and off, the path is reduced to but8.png, where the image doesn't exist. mywin.find(but8.png).click() It would be useful to keep the whole path to the image, sometimes the location is important. To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1271463/+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