Emna Ayadi
Emna Ayadi

Reputation: 2460

How to hide keyboard without closing the dialog box using Appium for IOS?

I have a dialog box that appears and while closing keyboard with hideKeyboard(); all the form is closed and i get back to the home page so that i can't continue the scenario for filling other data.

Here the screen :

enter image description here

Upvotes: 0

Views: 1434

Answers (3)

Lasse
Lasse

Reputation: 880

The default "strategy" of hideKeyboard(); is to tap outside the keyboard, but this can be changed to pressing a key on the keyboard instead.

See the java-client documentation (assuming you're using java-client?) for available hideKeyboard strategies: http://appium.github.io/java-client/io/appium/java_client/ios/IOSDeviceActionShortcuts.html

If your app's keyboard has for example a "Next" button to close the keyboard with, then you could use: driver.hideKeyboard("Next");

Upvotes: 1

Mahmud Riad
Mahmud Riad

Reputation: 1165

You can fill up the fields first using driver.sendkey() then tap on keyboard next button to switch the driver to the next field untill the last field. in last field you will get done button then you can tap on that button.

Upvotes: 1

Pavlo Boiko
Pavlo Boiko

Reputation: 583

Just use UIScrollView in your dialog box, and set scroll view class TPKAScrollViewController. Download class

Upvotes: 1

Related Questions