How can I check if some picture exists in my page?
The object exist in page but sometimes without the picture.
I mean like red X instead of my picture.
I found something....
Can I use this property? True/false ?
The best way to check if some picture exists is to use the Bitmap check point. If the page opens with red X instead of the expected picture, it means the picture is not present on the page.
The other way is to get the image properties, i mean the target URL using GetRoProperty function of the object and comparing with the same value stored in some variable.
The more experienced QTP personnel in this forum, will tell you not to use he bitmap checkpoint. It is way to much hassle with it when it comes to run them after some GUI has been changed.
So I took their advice and used : GetROProperty for the image. Perhaps someone has an even better suggestion.
- How many testers do you need to switch a light bulb? None, we just report it's dark -
I agree with Erik, GetROProperty on the alt or the src depending which one is available.
My linkedIn Profile