iphonedevkumar
iphonedevkumar

Reputation: 129

How to set a UItextfield text in XCTest

I want to set the text for my UITextField using xctest

app.textFields["enter "].tap()
app.textFields["enter "].text = "xyz"

but its throwing error and I am not finding any alternative way to do it.

Upvotes: 1

Views: 1244

Answers (1)

Andrew McKinley
Andrew McKinley

Reputation: 1137

try

app.textFields["enter "].typeText("xyz")

Upvotes: 4

Related Questions