Hi,
I am trying to validate if an object exits by using the following code:
Validate.Exists(repo.WebInternetExplorer.YesResultImageInfo);
In my situation the functionality might return a YesResultImage or a NoResultImage. Not anything else. How can I make Ranorex look for any of these two images. Yes/No anyone should pass the test.
Please help.
Thanks.
Validation Question
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Validation Question
You can, for example, use the RepoItemInfo.Exists method and check if any of the two elements exist, then pass the outcome to the Validate.IsTrue method:
Alex
Ranorex Support Team
Validate.IsTrue(repo.WebInternetExplorer.YesResultImageInfo.Exists() || repo.WebInternetExplorer.NoResultImageInfo.Exists(), "None of the two elements where found.");Regards,
Alex
Ranorex Support Team
Re: Validation Question
Works!!
Great.
Really appreciate your help
Great.
Really appreciate your help
