How to hide keyboard without closing the dialog bo

2019-06-11 08:37发布

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

3条回答
我命由我不由天
2楼-- · 2019-06-11 09:04

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.

查看更多
迷人小祖宗
3楼-- · 2019-06-11 09:18

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

查看更多
狗以群分
4楼-- · 2019-06-11 09:19

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");

查看更多
登录 后发表回答