philomath
philomath

Reputation: 133

send_keys() method doesn't work for entering Passcode on iPhone simulator

When I try using send_keys() method for the below screen to try to enter digits enter image description here

but I get the below error

.WebDriverAgent Code=1 "The on-screen keyboard must be present to send keys" UserInfo={NSLocalizedDescription=The on-screen keyboard must be present to send keys}

I tried workarounds such as invoking keyboard by cmd+k or drive.get_keyboard() but nothing works

Please suggest which method should be used here to enter the passcode for automated testing or any other approach

Upvotes: 1

Views: 398

Answers (1)

Jorge Diaz
Jorge Diaz

Reputation: 118

Can you try to click or tap, the individual elements(numbers) instead of using sendKeys, usually you use sendKeys for textfields,textareas or similars.

Upvotes: 1

Related Questions