Search code examples
javascriptautomationappium-ios

how to handle keyboard input in appium for ios in javascript?


For our app, we are doing automation using appium in JavaScript. In one screen, we need to enter a PIN from the keyboard.

I have tried pressKeyCode(Keycode) for Android and I was able to handle keyboard input.

Can someone help me in fining a way to enter number in iOS using some method ? pressKeycode(keycode) is not working in iOS.


Solution

  • Please try using the Sendkeys() function:

     element.Sendkeys("12");
    

    If this doesn't fulfill your needs, please post some code and we can help further.