UI Testing Failure - Neither element nor any descendant has keyboard focus on secureTextField

后端 未结 24 1525
难免孤独
难免孤独 2020-12-12 10:41

This is my case:

let passwordSecureTextField = app.secureTextFields[\"password\"]
passwordSecureTextField.tap()
passwordSecureTextField.typeText(\"wrong_pass         


        
24条回答
  •  执念已碎
    2020-12-12 11:05

    Use a sleep between launching the app and typing in data in textfields like this:

    sleep(2)
    

    In my case I was keeping getting this error every time and only this solution helped my out.

提交回复
热议问题