I've another question about "best practice" on image verification with coding.
Previously I've used the recorder to record the testcase and the verification steps. Also image verification.
I took the generated code and modified it to my needs. That resulted in parts like the below for a simple image verification step (some parts cut for clarity):
Code: Select all
Validate.ContainsImage(repo....Cell0_row1Info, Cell0_row1_Screenshot1, Cell0_row1_Screenshot1_Options, Validate.DefaultMessage, false); } static CompressedImage Cell0_row1_Screenshot1 = new CompressedImage("iVBORw0KGgo..."); static Imaging.FindOptions Cell0_row1_Screenshot1_Options = Imaging.FindOptions.Parse("1;None;0,0,0,0;True;10000000");
If the image in the AUT changes, what is the best way to get this into the coded testcase?
With Element Browser I can quickly create a screenshot of the element, store it as png and use Imaging.Load to create a Bitmap that can be used in compare/contains, etc.
But the issue here is that we have to create a whole structure to maintain and organize all screenshots.
Another way is to use the existing repository (rxrep). They are already well structured and you can simply rightclick an item to capture a new screenshot. Great, everything seems to be there - but unfortunately I see no way access those images from coding. Do I miss something here?
Use a temporary Recording1.rxrec to record an image validation step and let Ranorex generate the code.
Not that comfortable (and I have an issue with the capturing of table cells together with the GDI plugin, but that is my next task to seach the forum for, not to be discussed here).
Thanks for any input and hints.