I’ve noticed that for password fields in Android, uiautomator(and obviously also Appium) couldn’t find the key located in the strings.xml file.
As you can see from the screenshots attached, the value of the password field(the hint string) is not visible.
So, if I want to find the element by using the key from the strings.xml file, the test will fail.
Is there a way to fix this issue on the layout file?
I did some research on internet and it seems there are some issues. I’m asking about this, maybe anyone could give me a point in solving this.
A quick workaround would be to get all the EditTexts fields in a list and access them by their index….
Thanks!
-Marius


--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.
Yes, but this will imply using Selendroid and didn’t write the tests with selendroid. I’m trying to make use of localizable.strings and strings.xml since I have the same app for both iOS and Android platforms and dev team struggled create a match for all the keys from the two files J.
That’s a weird a bit, but I’ll make it work somehos :P
Thanks!
Are you referring to this: http://developer.android.com/tools/help/uiautomator/UiSelector.html#resourceId(java.lang.String) ?
What if my test project is not an Android project?
Thanks for your information.
But I didn’t understand how is possible to access the resource ids with uiautomator in your tests..
I’m pretty sure, something is missing to me J
I have the following EditText in the layout file:
android:id="@+id/signin_password"
android:hint="@string/signIn.password.placeholder"
And I get an error when I try to find the element by id(not using Selendroid).
With uiautomatorviewer I see “com.mywebgrocer.Albertsons:id/signin_password” as the value of resource-id….
But the element is still not found …
Device’s android version is 4.4.2, so it should alright
com.mywebgrocer.Albertsons:id/signin_password