Micro Focus QTP (UFT) Forums
how to get background color of a WinButton - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: how to get background color of a WinButton (/Thread-how-to-get-background-color-of-a-WinButton)



how to get background color of a WinButton - javierchen - 03-17-2015

Hi, I'm testing a windows application and it has a WinButton object whose background color constantly changes. I'd like to capture it's background color, but tried different things and have not found any answer. Object.bgcolor seems only works on WebElement, but not on Windows element.

Would be appreciate if someone can post a solution for WinButton.

Thanks.


RE: how to get background color of a WinButton - babu123 - 03-17-2015

Code:
strColor = objPmntTbl.currentStyle.color