0

Is there a way we can compare android images using Android View Client?

Current procedure i am trying is by using python comparison.

Pavan
  • 21
  • 2

1 Answers1

0

You can use PIL to do the comparison, for example you can use ImageChops.difference().

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
  • I Tried using PIL Library , ImageChops.difference(), it rite away gives me following error: Percent = ImageChops.difference(phonekeypad, current_image) File "C:\Python27\lib\site-packages\PIL\ImageChops.py", line 123, in differenc e return image1._new(image1.im.chop_difference(image2.im)) ValueError: images do not match – Pavan May 10 '16 at 18:32
  • Add some code to your question so we can try to find your problem. I guess you are passing the wrong images. – Diego Torres Milano May 10 '16 at 20:12
  • I have images with different sizes like one taken from Uiautomator and other one taken using screencap on shell so they are failing now tried saving static image using screencap too and it is working now. – Pavan May 11 '16 at 16:28