I have:
[TextView] id: "MonthValue" text: "11"
I want to get text as String of id MonthValue
Just use the query's Text
property:
app.Query(c => c.Id("MonthValue").Text
Reference: https://developer.xamarin.com/api/property/Xamarin.UITest.Queries.AppResult.Text/
Want to update Jim's answer. app.Query return an array, so we can not use
app.Query(c => c.Id("MonthValue")).Text
as itself. We should use app.Query(c => c.Id("MonthValue"))[0].Text
for example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With