iphonedevkumar iphonedevkumar - 1 year ago 112
Swift Question

How to set a UItextfeild text in XCTest

I tried many but did not find a correct solution,

i want to set the text for my UITextFeild 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.

can some one let me know how to do it

Answer Source


app.textFields["enter "].typeText("xyz")
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download