Visual testing bugs are valued these days, how to go visual testing to capture the bugs. Can you share your suggestions or steps for the same ?
The Logo in a website is validated with the HTML tag Associated but how to check if the logo has changed.
What do you mean by "visual testing bugs"? Can you be more specific as to what you're trying to do, like give an example?
You're talking about Region checkpoints or image comparisons. That's how I would go about doing it.
How can we use Visualizer or NameMapping stored images to compare if there is any changes on the go, Instead of regions/stores ?
> How can we use Visualizer or NameMapping stored images to compare
No way. Those images are provided for your convenience only and cannot be used from within your test code.
You have two options:
a) Use Stores/screenshots comparison as suggested by Robert; or
b) Use some third-party service (like Applitools, for example).
For Visual Testing, We have to compare the images on the go.
1) if we are using visualizer to capture the images
2) No selecting the checkbox for "Auto Update Frames"
3) Capture Images are activated.
If the system 1 with Resolution 1 (Y x Z) in which the Code is created.
In System 2 with Resolution 2 ( A x B) if we are executing the code for eg: Click a button.
The Excution fails due to image capture is not matching.
So, Do we have a possibility to an improved feature to activate the Visual testing
1) Adding Regions, Every Object image need to be added (tedious process)
2) Adding third pary (Appi tools) is expensive.
Instead if we can use
The following method can be used for visual testing.
PictureObj.Difference(Picture, Transparent, PixelTolerance, Mouse, ColorTolerance, Mask)
Instead of Picture loading an external file, If we have a method to refere to Visualization .
Visual testing can be achieved using testcomplete.
Just a thought. Please throw the possibilities and correct me if i'm wrong.
If we have another function similar to
w = Sys.Desktop.ActiveWindow().Picture(20, 20, 50, 50);
w = NameMapping.Sys.QRBrowser.LoginPage.buttonLogIn.Picture()
Yes, you can use the Picture.Difference method... that's what I meant by image comparison. However, the initial "PictureObj" in your example STILL needs to be something gathered from the automation in order to do the comparison and, on the fly in the code, you can't grab the images from the Visualizer or from the NameMapping repository. Those images are not available at runtime.
But... that doesn't really seem to be the problem... you mention something about a difference in resolution causing a click to fail. That has nothing to do with image capture... that has to do with how you are coding your clicks and how you are constructing your tests.
First of all, you should ALWAYS try to make sure your dev environment and your execution environment match as much as possible.
Secondly, you should avoid, as much as possible, any code execution which requires a hard-coded pixel screen location.
So... it seems that you're conflating problems here... you're trying to solve a "unable to click" problem with something to do with image capture.
It would be helpful if, for those two scenarios, you give us some code example of what you're attempting. Perhaps we can resolve your problem without having to go through image processing.
Sorry for getting deviated from my question with the example.
I'm looking for a feature in which the Images are also stored with object properites (NameMapping).
In execution, As we compare Object Properties and Perform methods on it. Similarly, We can verify the Images too.
Yes, We can do that currently by adding all the Images on Regions and Compare on Run time.
Instead, Like Expected Object Properties like IdStr, Object Type are stored in NameMapping.
Expected Image can also be stored during first capture in NameMapping.
A Comparision method for Images can be created based on Every Object without manually adding Images to regions.
In a Simple Way, If Images can be added to regions/NameMapping/ Visualizer using Object properties.
Image Checkpoint or Image Comparision can happen for every step without creating a seperate feature.
Option for Image validation on object level can be create for successful Visual validation.
ExpectedImage = Namemapping.Sys.Myapplication.LoginButton.StoredImage
Method : StoredImage
ActualImage = NameMapping.Sys.Application.LoginButton.RuntimeImage
If ExpectedImage = ActualImage , Visual Validation will be sucessful.
Storing Images in Regions on Object level
Comparing Images with Object Level
Finding an Alternative for applitools within TestComplete by creating few new methods.
Sorry, If my explaination was not clear.
Thanks for everyone who responded.