You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Description
Summary:
In Xcode 9, the
value
of a TextField XCUIElement is returning theplaceholderValue
when the text field is empty. This is different from Xcode 8, wherevalue
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 asplaceholderValue
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
The text was updated successfully, but these errors were encountered: