如何在不关闭对话框的情况下使用 Appium for IOS 隐藏键盘? [英] How to hide keyboard without closing the dialog box using Appium for IOS?
问题描述
我有一个对话框出现,当用 hideKeyboard();
关闭键盘时,所有表单都关闭了,我回到主页,这样我就不能继续填写场景了其他数据.
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.
这里是屏幕:
推荐答案
hideKeyboard();
的默认策略"是在键盘外敲击,但这可以改为按下一个键而是在键盘上.
The default "strategy" of hideKeyboard();
is to tap outside the keyboard, but this can be changed to pressing a key on the keyboard instead.
有关可用的 hideKeyboard 策略,请参阅 java-client 文档(假设您使用的是 java-client?):http://appium.github.io/java-client/io/appium/java_client/ios/IOSDeviceActionShortcuts.html
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
如果你的应用程序的键盘有一个下一步"按钮来关闭键盘,那么你可以使用:driver.hideKeyboard("Next");
If your app's keyboard has for example a "Next" button to close the keyboard with, then you could use: driver.hideKeyboard("Next");
这篇关于如何在不关闭对话框的情况下使用 Appium for IOS 隐藏键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!