Posts: 32
Threads: 19
Joined: Feb 2008
Reputation:
0
09-27-2008, 02:18 PM
Hi All,
I am new to QTP. In our application all mandatory fields are in yellow color. We need to check whether the fields are mandatory, by checking the Field's color. I could not find any color property to check the color. If there is any way to check the color, please let me know.
Thanks,
Pallavi [/color]
Posts: 1,105
Threads: 18
Joined: Jan 2008
Reputation:
8
09-27-2008, 07:43 PM
Have you checked with Object Spy?
Posts: 32
Threads: 19
Joined: Feb 2008
Reputation:
0
09-29-2008, 09:57 AM
Yes Ankur, i checked with object spy. The property to check the color is not listed in the properties list. Please let me know if there is any way to check the color.
Thanks & Regards,
Pallavi
Posts: 1,105
Threads: 18
Joined: Jan 2008
Reputation:
8
09-29-2008, 10:02 AM
Can u attach the screen shot here for all the RO properties of the yellow field? Otherwise use DOM to access the color of the object.
Posts: 1
Threads: 0
Joined: Oct 2008
Reputation:
0
10-02-2008, 11:59 PM
Hi Pallavi,
As per my experience, you can use "File name" property of the image control. In case text box recongnized as image , you will find file name property associated with it. Use "file name" property and verify its value in runtime. You can't verify the color of image by red or blue or yellow. You will have file name property which has "green.gif" (example) as value.
Above all , it depends how it was designed. As Ankur requested , please attach screenshot. I will see let know further ...
Thanks,
Kiran
Posts: 240
Threads: 38
Joined: Jun 2009
Reputation:
0
07-28-2009, 05:21 PM
Hi Pallavi,
with the "outerhtml" property u would able to identify which colour it is
here i am exaplaining you with the mandatory field as a red colour then .getrowproperty("outerhtml") then this value would be <FONT color=#cc0000>Textarea</FONT> then split this value in to your convinent way and validate with this
If color=#cc0000 then reporter.reportevent ,,,,,,
Try this once and let me know