eficode / robotframework-imagehorizonlibrary

Cross-platform Robot Framework library for GUI automation based on image recognition
MIT License
80 stars 28 forks source link

Compare multiple images different color depth #29

Closed aaltat closed 7 years ago

aaltat commented 7 years ago

My application should work with different color settings, from 32 - 16bit. Now if I have image taken with 32bit and my display bit depth is set to 24, the reference image is not found. To work a round this problem, I could do something like this:

| ${status} = | Run Keyword And Return Status | ImageHorizonLibrary.Wait For | image32bit.png |
| ${status} = | Run Keyword Unless |  ${status} | Run Keyword And Return Status | ImageHorizonLibrary.Wait For | image24bit.png |
| Run Keyword Unless |  ${status} | ImageHorizonLibrary.Wait For | image16bit.png |

Which comes quite hard and difficult to read and maintain. I was thinking, would be possible to create a keyword that would take multiple images as an argument and check them one by one, Something like this:

| ImageHorizonLibrary.Wait For Images | timeout=30 | image32bit.png | image24bit.png | image16bit.png |

Would this be feasible feature?

I am sure about the keyword name, should is new new keyword needed at all or should the existing keyword modified to support varargs?

Tattoo commented 7 years ago

We have another issue (#15) where if you provide a folder with images as a reference image, all images in that folder are tried.

Would this work for you (in principle, as the feature is not yet released)?

aaltat commented 7 years ago

Yes that would work nicely also for me.

Tattoo commented 7 years ago

I'll close this issue then, let's continue in #15 then!