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

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

This is my case:

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


        
24条回答
  •  攒了一身酷
    2020-12-12 10:56

    Had the same issue with Securetextfields. The connect hardware option in my Simulator was of, but still ran into the issue. Finally, this worked for me (Swift 3):

     let enterPasswordSecureTextField = app.secureTextFields["Enter Password"]
        enterPasswordSecureTextField.tap()
        enterPasswordSecureTextField.typeText("12345678")
    

提交回复
热议问题