-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to append text due to placeholder value being returned as element value #986
Comments
As Appium, this is because the original project already implemented so. This project keeps the backward compatibility.
would #987 help? |
thank, I've considered adding a placeholderValue, but that would create another issue - I actually can't tell when the value is empty, because if the value matches the placeholderValue, that would be disastrous. |
Ah, without placeholder. |
Yes, I think we need a new name to represent the original value |
Or would “label” help? It comes from accessibilityLabel. So if OS didn't assign your placeholder value as the label value, it might help |
No way, I tried all attributes, and finally found in the source code that it uses placeholderValue. Since my automated testing is now AI-based and doesn't need to consider element lookup, I temporarily removed placeholderValue locally. |
Perhaps only |
Yes, I think the only solution is to add a new attribute, such as original value. |
Do you need like https://github.com/appium/WebDriverAgent/compare/master...appium:WebDriverAgent:xcvalue?expand=1 or e.g.
When I tested that with our testing app: ![]()
Could you share your target page source with https://github.com/appium/WebDriverAgent/compare/master...appium:WebDriverAgent:xcvalue?expand=1 branch to see the actual page source? I'd like to check |
Description
I'm trying to implement a text append functionality for text fields in my automation tests, but I've noticed that the current implementation in
XCUIElement+FBWebDriverAttributes.m
prevents this from working correctly.In the
wdValue
method, when handling text fields, the code sets the placeholder value as a fallback when the actual value is empty:This causes an issue where I can never properly append text to a field that has a placeholder, as the WebDriverAgent returns the placeholder text instead of an empty string when the field is empty.
Question
Reference
https://github.com/appium/WebDriverAgent/blob/master/WebDriverAgentLib/Categories/XCUIElement%2BFBWebDriverAttributes.m#L84
The text was updated successfully, but these errors were encountered: