Skip to content
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

34505268: XCUIElement TextField value returns placeholderValue #18410

Open
openradar-mirror opened this issue Sep 19, 2017 · 3 comments
Open

Comments

@openradar-mirror
Copy link

openradar-mirror commented Sep 19, 2017

Description

Summary:
In Xcode 9, the value of a TextField XCUIElement is returning the placeholderValue when the text field is empty. This is different from Xcode 8, where value was empty.

Steps to Reproduce:
In my app code, I am setting the attributedPlaceholder property on my UITextField instance.

In my UI test, this should pass:
let textField = XCUIApplication().textFields["address_line_1"]
let stringValue = textField.value as? String ?? ""
XCTAssertTrue(stringValue.isEmpty) // FAILS

Expected Results:
value of a TextField element should be the user-entered value, not the placeholder value.

Actual Results:
value is the same as placeholderValue when no text has been entered by the user.

Version/Build:
Xcode 9 GM -- Version 9.0 (9A235)

Configuration:
Running in "iPhone SE" simulator

Product Version: Version 9.0 (9A235)
Created: 2017-09-19T00:08:02.323040
Originated: 2017-09-18T00:00:00
Open Radar Link: http://www.openradar.me/34505268

@openradar-mirror
Copy link
Author

Modified: 2017-09-22T14:12:55.647600

1 similar comment
@openradar-mirror
Copy link
Author

Modified: 2017-09-22T14:12:55.647600

@jrtibbetts
Copy link

This still appears to be happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants