Checking the background color of an object on my GUI application
I am new to TestComplete and working with Keyword Tests to test my GUI application. I want to see if a button on my screen is red, yellow, or green. I can do a property checkpoint on each of the color properties (e.g. button is red):
Aliases.XXX_ShellView.ShellView.LayoutDocumentPaneControl.RXLed_C.Fill.GradientStops.zcollection.zlistStore.zentry0.Color, "B", 0, 0, True
Aliases.XXX_ShellView.ShellView.LayoutDocumentPaneControl.RXLed_C.Fill.GradientStops.zcollection.zlistStore.zentry0.Color, "G", 0, 0, True
Aliases.XXX_ShellView.ShellView.LayoutDocumentPaneControl.RXLed_C.Fill.GradientStops.zcollection.zlistStore.zentry0.Color, "R", 0, 255, True
But I don't see how to check the AND of those conditions. Again, I am new to Keyword Tests, but there has to be a way to do this, right?
Hi betty1,
Explore your control in the Object Browser - perhaps it provides a native property (like, Background color or Color) that you can call from script.
If this doesn't help, take a look at the following KB article:
Also, I've found several threads with a similar question:
I hope it helps.