xpresser-team team mailing list archive
-
xpresser-team team
-
Mailing list archive
-
Message #00041
Re: Xpresser image accuaracy
Ugh, I remember having tons of problems with this, specifically image
accuracy. If you run the code 5 times in a row, does the mouse cursor
always end up at the same exact location on the image. I found that the it
would sometimes drift , left / right / up / down, just enough to miss the
image your trying to select or point to.
I can say that testing in different resolutions is going to be a wash.
What happens if you don't use the similarities file? I don't remember
hitting an issue like this specifically. But does it occur with all images
or just the one you attached?
It's been so long since I used expresser I would have to visit my notes.
-Sean
On Fri, Jul 26, 2013 at 11:53 AM, jared <afonit@xxxxxxxxx> wrote:
> As an aside
> if I use:
>
> #!/usr/bin/python
>
> from xpresser import Xpresser
> xp = Xpresser()
> import time
>
> def main():
>
> xp.load_images('/home/afonit/Documents/work/Amdocs/Amdocs/custom_coded_projects/Xpresser/coordinates')
> xp.click('top_left')
> print("found it")
>
> if __name__ == "__main__":
> main()
>
>
> I can get it to recognize with:
> similarity = 0.40
> rather than the
> similarity = 0.20
> in the other script.
>
>
> On Thu, Jul 25, 2013 at 5:46 PM, jared <afonit@xxxxxxxxx> wrote:
>
>>
>>
>>
>> On Thu, Jul 25, 2013 at 4:41 PM, Chris Gagnon <chris.gagnon@xxxxxxxxxxxxx
>> > wrote:
>>
>>> I have not run into your similarity issue, what desktop environment are
>>> you using? can you create a tarball with your code and pictures?
>>>
>>
>> I am on fedora 19
>> environment:
>> uname -a
>> Linux localhost.localdomain 3.9.9-302.fc19.x86_64 #1 SMP Sat Jul 6
>> 13:41:07 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>>
>>
>>>
>>> are you using xp.wait("image-name")?
>>>
>> yes
>>
>> Here is the code:
>>
>> #!/usr/bin/python
>>
>> from xpresser import Xpresser
>> import time
>>
>> def main():
>> xp = Xpresser()
>>
>> xp.load_images('/home/afonit/Documents/work/Amdocs/Amdocs/custom_coded_projects/Xpresser/coordinates')
>> xp.click(535,487) #username
>> time.sleep(1)
>> xp.type('jared.thompson@xxxxxxxxxx')
>> xp.click(535,511) #password
>> time.sleep(1)
>> xp.type('Pigd9#0ij23I89273251')
>> time.sleep(1)
>> xp.click(530,587) #login
>> xp.wait('top_left',50)
>> print("found it!")
>> xp.sleep(3)
>> xp.click(908,300) #clicks of 'status-message' if it is present
>>
>> #xp.click(1338, 133) #logout
>>
>>
>> if __name__ == "__main__":
>> main()
>>
>>
>> the image ( I have tried many, but here is one) is attached.
>>
>
>
> --
> Mailing list: https://launchpad.net/~xpresser-team
> Post to : xpresser-team@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~xpresser-team
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References