Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 81910

How to get element color using UITest?

$
0
0

How to get color of any element?

For example, I have query c => c.Class("AppCompatButton") to get button.
app.Query(c => c.Class("AppCompatButton").Invoke("getBackground")) always returns null;
app.Query(c => c.Class("AppCompatButton").Invoke("getPaint") returns many properties but what I need is not set: {"bgColor": 0}, {"color": -1} etc.
Seems that I need to get some kind of color or background resource. Or maybe there is some Property with color similar to hint property - Property("hint", "Enter text") will find all elements with such hint.


Viewing all articles
Browse latest Browse all 81910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>