Comments (13)
do you know what the name of the android widget is that corresponds to the secure textfield? like com.android.widget.xxxxx
from appium.
do you know what the name of the android widget is that corresponds to the secure textfield?
In calabash-android I do query "edittext id:'password_edit'"
For my app I have a custom class that extends EditText. Both regular textfields and secure textfields use the same widget. android:password
controls if it's used to display a password or not.
from appium.
$driver.find_elements :tag_name, :editText
finds both the secure text field and the regular text field.
from appium.
What happens if you pass in "com.yourcompany.yourapp.YourCustomWidget" as the tag name? I wonder if uiautomator can see custom controls.
from appium.
What happens if you pass in "com.yourcompany.yourapp.YourCustomWidget" as the tag name?
It doesn't find it.
Selenium::WebDriver::Error::NoSuchElementError: An element could not be located on the page using the given search parameters.
from appium.
hmm, looks like this might be a fundamental limit of the uiautomator approach. only thing i found via google is this unanswered question: http://facebook.stackoverflow.com/questions/14948341/how-to-fill-in-password-edittext-with-android-uiautomator.
alternative: select your password field by content-description (i.e., by "name") after setting one in the app.
from appium.
edittext
finds the custom widget so that works. If id selection was implemented then that'd be perfect. #228
from appium.
Back to the custom finding possibility, please check out: http://developer.android.com/tools/help/uiautomator/UiSelector.html#className(java.lang.String)
Does this spark any thought about what a different "className" could be that you could pass in as a selector? maybe not com.yourCompany.yourApp.xxx
? Is there something that's equivalent to android.widget.XXX
in your own package-space?
from appium.
We'd probably want to make an example app.
package com.my.widgets;
public class EditText extends android.widget.EditText {
I'm using the fully qualified class name com.my.widgets.EditText
so I don't think it could be anything else.
from appium.
Hmm. well the documentation doesn't say one way or another whether custom controls are findable by class in UiSelector. I guess this implies they are not! But good thing it extends EditText and so is findable. As I wrote in #228, finding by the android id doesn't seem possible. So unless you can think of anything else I'm going to close this issue. The two options are for doing what you want are:
- find the password field as a regular text field by index
- set a content-description for the password field and find by that
from appium.
I think searching for tag name secure
on Android should throw an error because it's not possible to implement using uiautomator. The current behavior implies that it searched and didn't find any.
from appium.
fixed in #234
from appium.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from appium.
Related Issues (20)
- My automation tests are flaky- get alert text returns empty string sometimes HOT 7
- bug: updating appium, driver or plugin, is not synchronized in node_modules/.cache/appium/extensions.yaml HOT 6
- Issue when perform gestures on both Android and iOS HOT 3
- [Feat]: introduce getContextsWithDetails endpoint HOT 4
- bug: Scroll on Android don't work HOT 1
- [Feat]: Can I specify my own registry in "appium driver install --source=npm" HOT 4
- universal-xml plugin issue with webview mode HOT 7
- Appium server crashes and shuts down on first test HOT 21
- Real device architecture is not supported application after upgraded xcuitest driver to 7.15.1 HOT 6
- Nothing happen after Responding to client with driver.createSession() HOT 6
- Delete key on iOS keyboard is not working HOT 10
- [Feat]: Support for custom usbmuxd socket path or url HOT 1
- "Error:Appium Settings app is not running after 30000ms" while running emulator in headless in Android version 13 and 14 HOT 3
- bug: XCUITest-driver invalid platform detection when ipa have more than 1 bundle HOT 3
- Unable to resolve the launchable activity of 'com.google.android.youtube' HOT 8
- Appium accessibility id's different on android to iOS HOT 1
- bug: Appium Inspector loads some app screens slowly/not at all HOT 1
- Possible bug - I get certain errors ONLY when "isHeadless" is set to true HOT 2
- bug: Appium XCUITest crashes the iOS app on clearing the input XCUIElementTypeTextField HOT 3
- [iOS] Clicking on a button is success but nothing happens on the UI. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appium.