How to validate "either" image

Ask general questions here.
radly82
Posts: 6
Joined: Fri Aug 03, 2018 4:15 pm

How to validate "either" image

Post by radly82 » Tue Apr 27, 2021 10:15 pm

I have a test case that i have to validate then when i perform an action i need to make sure that the default icon changed to a different specific icon.
That is no problem. The issue is that when this test is run across multiple pc's (like say a laptop compared to desktop), the "default" icon will be different.

Is there a way to make a validation point to say "Validate that this icon is icon1 or icon2 or icon3 or icon4, if so pass...... if it is not or is icon5 then fail"?

This would help me not have to make a separate test case for each platform that we test by just asking if it is "any" of these icons or pictures.

Right now this is an image an not an actual icon. But would be great if this can be done with an image or an object.

User avatar
Stub
Posts: 439
Joined: Fri Jul 15, 2016 1:35 pm

Re: How to validate "either" image

Post by Stub » Wed Apr 28, 2021 8:16 am

Are you using Recordings or Code Modules? The latter are totally flexible, especially for this sort of thing.

I sometimes validate against different images based upon machine conditions, that my Code Modules determine when needed and adjust to accordingly. I've also setup tables of data in our test code such that if the tests happen to run on a particular machine with a slightly different setup then overrides can be applied where necessary e.g. my test development box vs our actual testing machine.

radly82
Posts: 6
Joined: Fri Aug 03, 2018 4:15 pm

Re: How to validate "either" image

Post by radly82 » Wed Apr 28, 2021 4:02 pm

Recordings.