Forum Discussion
- amarr1143lContributor
Hi,
Check objGridCell.Background.Color object.
- tonydugayContributorIf that doesn't help you you could try something like this code snippet (which is looking at a table cell in this case): var pict = theTable.cell.Picture(); Log.Picture(pict); var pixel = pict.Pixels(1, 1); Log.Message(pixel); return pixel; This will give you the colour of the pixel
Hello,
First, you need to learn what grid control is used in your application. You can check this in the ClassName or ClrClassName property in TestComplete’s Object Browser. After that, refer to the control’s documentation to learn a native method or a property that returns the desired value. You can call the found method from your TestComplete test.
Another option is to analyze the "Get a control's background color" ( http://smartbear.com/viewarticle/9050/ ) How To article – it contains a script that returns the color of the control object. It should work for all controls. If you pass the path of your cell object to the function, it should return the background color of your cell.