Hi,
The AUT has a SwfTable. This table has many rows and few of them are highlighted.
Highlighted in the sense, the cells in that row has some other color compared to other unhighlighted rows.
I want to know how can I validate this?
Please help me on this.
Thanks in Advance
Hello ,
As Mike Germen says you could use GetCellApperance and GetRowApearance:
enumeration can be found in the TestAdvantage source code, which you can download from our website. Here's the complete list:
public enum QTPAppearanceProperty
{
appAlphaLevel,
appBackColor,
appBackColor2,
appBackColorAlpha,
appBackColorDisabled,
appBackColorDisabled2,
appBackGradientAlignment,
appBackGradientStyle,
appBackHatchStyle,
appBorderAlpha,
appBorderColor,appBorderColor2,
appBorderColor3DBase,
appCursor,
appFontData,
appForeColor,
appForeColorDisabled,
appForegroundAlpha,
appHasFontData,
appImage,
appImageAlpha,appImageBackground,
appImageBackgroundAlpha,
appImageBackgroundDisabled,
appImageBackgroundOrigin,
appImageBackgroundStretchMargins,
appImageBackgroundStyle,appImageHAlign,
appImageVAlign,
appStyleLibraryName,
appStyleResourceName,
appTextHAlign,
appTextTrimming,
appTextVAlign,
appThemedElementAlpha
}
Please let me know if you have any further questions.
Even I am expecting an answer for this. Can anyone reply???
So where would one find the documentation that describes the available "appearanceprop" values that can be used in QTP if I was to use the GetCellAppearance method?
There are several ways to do validate the color of a cell. It unfortunately is drastically different depending on how your developer coded the coloration of the cell. How JSoldano mentioned is one way, and can work. Two additional methods were added as of 2010 Volume 3.
GetCellAppearance and GetRowAppearance, it accesses the Appearance property directly which is typically how many of the internal methods of the grid set appearance based changes to the cells.
Here is what worked for me:
SwfWindow("WindowName").SwfWindow("AnotherWin").SwfTable("TableName").GetCellProperty(1,"1","BackColor")