Works perfectly in IE, but we are now supporting Chrome and Firefox and this is not working when we run our tests in those browsers. I read somewhere that Getcomputedstyle could solve my problem and I can use that instead of CurrentStyle.
I tried to find some information about it in combination with QTP or UFT but I could not find an example.
Can someone give me some kind of an example how I can use it in a UFT script? At the moment I dont have a clue but perhaps if someone can point me in the right direction, I can solve this issue.
Thanks in advance for your time and hopefully your reply :-)
QTP is intended and largely used as a functional test tool. Sure you can do some ui color checking and such with it. But there's not good ROI on that so it's a rare practice. Throw in testing old versions of Chrome with it and you very well may be the only person attempting this and talking about it. May have to buy that book.
There may be a way to get the handle of the object on the browser.
Then use the API to ask questions about the color of the object.
I have seen this for other browsers and non-browser objects.
I don't remember how to do it. Does anyone else know this way?
Why don't you try using 'Insight' (UFT 11.5+).
Insight is more modern (and useful) implementation of the old bitmap checkpoint and therefore is colour/shape sensitive.
Depending on the variation in background colour for your object, you may find it works very well, or it may pass too easily (it can be surprisingly change tolerant).
I agree with the 'no ROI' statement. For 'look & feel' you can't beat the old mark one eyeball which can scan a whole page in a matter of seconds as opposed to the number of hours it would take to automate the same checks.
I like a product from Tevron. It is called CitraTest. I haven't used it since 2001, but it is still around. I wish that HP would purchase this product and add use it to improve their insight features. It is good at recognizing parts of the screen on the bitmap level.
This is my own opinion and does not reflect anyone that I work with or for.