Micro Focus QTP (UFT) Forums

Full Version: how to get background color of a WinButton
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Code:
strColor = objPmntTbl.currentStyle.color