I'm working with an Android app. The app is written in Xamarin Forms and I've been told by the developers that looking at the XAML files for the object type won't work because the object is abstracted so it is generic and will be different object type depending on which platform it is compiled for (iOS or Android).
In REPL I can use this command, to find out that it is a TextView.
(output from REPL):
app.Query(x => x.Marked("John Doe").Invoke("getAccessibilityClassName"))
Query for Marked("John Doe").Invoke("getAccessibilityClassName") gave 1 results.
[
[0] "android.widget.TextView"
]
If I go to this web site https://developer.android.com/reference/android/widget/TextView I can scroll through the Public Methods on the right side, and see that there is something called 'getTextColors'. When I try to invoke this, I get a result with nothing in it. What am I doing wrong?
(output from REPL):
app.Query(x => x.Marked("John Doe").Invoke("getTextColors"))
Query for Marked("John Doe").Invoke("getTextColors") gave 1 results.
[
[0] {
changingConfigurations => [
],
colors => [
[0] [
]
],
defaultColor => [
],
states => [
[0] [
]
],
opaque => [
],
stateful => [
]
}
]
I know this is the right TextView, as I've tried the following:
(output from REPL):
app.Query(x => x.Marked("John Doe").Invoke("getText"))
Query for Marked("John Doe").Invoke("getText") gave 1 results.
[
[0] "John Doe"
]app.Query(x => x.Marked("John Doe").Invoke("getTextSize"))
Query for Marked("John Doe").Invoke("getTextSize") gave 1 results.
[
[0] 63
]
I also read somewhere to try 'getCurrentTextColor', but that returns -1
(output from REPL):
app.Query(x => x.Marked("John Doe").Invoke("getCurrentTextColor"))
Query for Marked("John Doe").Invoke("getCurrentTextColor") gave 1 results.
[
[0] -1
]
Thank,
Aracknid