In my application, any mandatory field has a yellow text box/combobox/list box etc.
I spy them but there is no color property shown. What will be another way to get the color of the text box. Its not a web based application. Its client server application. I am using QTP8.2.
tarun...i tried for web application too
a=Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Object.style.BACKGROUNDCOLOR
nothing is coming in msgbox...i tried even for WebEdit object...msgbox is appearing empty ...
ostfold, the code i specified was for a textbox and not for a image. Image would not have a back ground property. It would be the image actually that would have some colors.
And to the other problem that you are facing, i did some research and found that it would be quite difficult to get the background color. WinEdit objects dont have any run-time properties and they dont have a property called back color. I tried to use the API GetBKColor but it didnt give the correct result. Hmmm.... There is some thing related to GDI Brushes API that can give you the actual backround color. And i am not good at graphics api. You can create a Class in VB that could get the background color given the hWnd of the Window. I know its too complex but this what i have in mind till now.