WinAppDriver 1.0 How to get BackgroundColor/ForegroundColor of element in Native Wins App
I tried to use GetAttribute of element to get text patterns like background color, foreground color... but unlucky. Please can help!
Hi @hainguyenh,
You can use GetAttribute to get all element attributes shown on inspect.exe such as Name, ControlType, IsEnabled, etc. Some examples can be found on our sample test below:
https://github.com/Microsoft/WinAppDriver/blob/v1.0-RC/Tests/WebDriverAPI/ElementAttribute.cs#L38
Unfortunately, other attributes like background color and foreground color are not exposed through the accessibility layer which made it not accessible in Windows Application Driver.
Hi @timotiusmargo,
Thanks a lot for your confirmation.
What accessibility layer are you referring to? Is this in Appium or the Windows control?