Re: [Sikuli-driver] [Question #259554]: install sikulixsetup-1.1.0.jar doesn't respond
Question #259554 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259554 Status: Open => Answered RaiMan proposed the following answer: on a command line use java -jar path-to-sikulisetup-1.1.0.jar ... might reveal more information. -- 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 Status: Open => Answered RaiMan proposed the following answer: What exactly are you doing, to "compare two images"? What about the similarity score you get? in doubt send me the 2 images and the relevant snippet as zip silently to my mail at https://launchpad.net/~raimund-hocke -- 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 #259550]: issue in comparing two images
Question #259550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259550 RaiMan proposed the following answer: @Eugene thanks for the example. I do not know, what you mean by "Java API it's already solved", but your example fails on all levels, but has a workaround. The reason behind has nothing to do with some "color-strict flag", since there is none available. If you use your 2 images you will get the following result (supposing the coloured is the pressed version): pressed matches pressed with 1.00, but unpressed only with 0.97 unpressed matches both pressed and unpressed with 1.00 this leads to the workaround: unpressed = Pattern("unpressed.png").exact() pressed = Pattern("pressed.png").exact() button = find(unpressed) # now we can check the found button if button.grow(10).exists(pressed, 0): print "button is pressed" else: print "button is not pressed" the .grow(10) extends the match region to be robust against differences in the shots (width/height). Another possibility using only the pressed image (which makes it more robust with respect to the mentioned shot problem): button = Pattern("pressed.png").similar(0.95) pressed = Pattern(button).exact() mButton = find(button) # now we can check the found button Settings.CheckLastSeen = False # see comment if mButton.exists(pressed): print "button is pressed" else: print "button is not pressed" Settings.CheckLastSeen = True # see comment comment: version 1.1.0 has a feature, that stores the last match with the image and with the next search the image is first searched, where it was before, which speeds things up with a factor 50 ... 100. In this special case it leads to a problem (I will fix that). So for now we have to switch the feature off for the check and on again afterwards. The real reason of the initial problem I guess is the fact, that internally the score is rounded at the second decimal (0.99+ is exact and reported as 1.00). In your case, on some decimal position 2+, we might find differences in the score. In version 1.2 I will revise the score handling anyway, so it might well be, that your case will be handled as expected. If you have more than one of these buttons visible in this moment, you have to use findAll() and scan the matches. -- 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 #259577]: Is there a way to discard the background while image compareing
New question #259577 on Sikuli: https://answers.launchpad.net/sikuli/+question/259577 HI Raiman I am automating an android phone and there is a Music player icon on the home screen. I take the image of the icon and do a click but if I change the wall paper in the background, it does not work and gives an error find failed. Is there a way I can discard the background colour so that even if i change the wall paper it does not effect my script. 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 #259577]: Is there a way to discard the background while image compareing
Question #259577 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259577 Status: Open => Answered RaiMan proposed the following answer: Make a shot of the icon, that has as little background as possible concentrating on the parts of the icon, that makes it unique (distinguishes from other icons). Currently there is no feature, to ignore parts of an image (or take it as transparent). -- 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 #187508]: UnicodeEncodeError when writing data into text file
Question #187508 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/187508 Atul Desai posted a new comment: Hi RaiMan, I would like to raise my question in same thread, as I was facing same issue where I need to copy the text and compare. Now as I have overcome the issue one another issue I am facing is while importing same script in another scripts. Below is my script. Can you please help me to resolve the issues as it raise "WHILE IMPORTING!! Non-ASCII character in file ' D: test.sikuli\test.py', but no encoding declared; see http://www.python.org/peps/pep-0263.html for details" Script1: Test from sikuli import* import codecs compareValue = "We built the new Hydra console just for you! We encourage you take a tour to check out the new look and functionality. If you’d like to continue using the old Hydra, click “Switch Back.”" def testnow(): getTitle = Region(find("1419429990021.png")) getTitle.highlight(2) getContent = Region(getTitle.x, getTitle.y+50, getTitle.w, getTitle.h) hover(getContent) for x in xrange(3): mouseDown(Button.LEFT) mouseUp() type("c", KEY_CTRL) gettext = Env.getClipboard().encode('utf-8') print "Text: ",gettext gettextnew = gettext.decode('ascii', 'ignore') if gettext == compareValue: print "Pass" else: print "Fail" testnow() Script2: Test1 from sikuli import* import codecs import test reload(test) -- 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 #187508]: UnicodeEncodeError when writing data into text file
Question #187508 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/187508 Atul Desai posted a new comment: please ignore gettextnew = gettext.decode('ascii', 'ignore') as i had commented this line while execution. Sorry for inconvenience. 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 #259550]: issue in comparing two images
Question #259550 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/259550 Status: Answered => Open Sepid is still having a problem: @Raimund Thanks for your message. I sent you the images into your email address and explained everything there. For other friends who have any suggestion, they can access to the image files from the following link: https://drive.google.com/folderview?id=0B0HOjfpxPc67TS13VXlPMEh5eWs&usp=sharing and a summary of my problem: I am trying to write an automated test case for the output of a visualization application. I want to verify the visualized output. I am writing my code in C#, that' why I am using a sikuli wrapper for .Net called SikuliIntegrator. (a simple tutorial can be found here http://qaagent.wordpress.com/2013/07/17/how-to-use-sikuli-in-my-c-coded-tests/) I don't know what is the default similarity score in SikuliAction.Exists function, but when I use it without setting any similarity score, these two images are considered as the same. I assume that when we use the similarity score, the result would be the same. Thanks in advance for your help. -- 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