【问题标题】:How to hide keyboard of ios real device with appium interface如何用appium界面隐藏ios真机的键盘
【发布时间】:2022-01-09 17:47:58
【问题描述】:

我想从 appium 界面隐藏我的真实设备的键盘。有什么我可以使用的能力吗? 我尝试了一些解决方案,但对我不起作用。我们在代码端使用 hideKeyboard() 但我不知道我们可以在 appium 的界面上使用什么。你能帮我吗?

这里是sn-p:

{
"platformName": "iOS", 
"platformVersion": "13.2.3", 
"deviceName": "iPhone 6s", 
"udid": "udid of ios phone", 
"bundleId": "bundleId of app", 
"automationName": "XCUITest", 
"noReset": true, 
"fullReset": false 
}

【问题讨论】:

  • 请提供代码为 sn-p 而不是截图
  • 感谢您的推荐,我在上面添加了sn-p

标签: ios automated-tests appium xcuitest desiredcapabilities


【解决方案1】:

试试这个代码:

public static IOSDriver<IOSElement> iosDriver;
iosDriver.hideKeyboard();

在模拟器和真正的 ios 设备上为我工作

【讨论】:

    猜你喜欢
    • 2017-10-15
    • 2013-01-12
    • 1970-01-01
    • 1970-01-01
    • 2016-05-30
    • 1970-01-01
    • 2013-09-17
    • 2016-05-04
    • 2018-01-22
    相关资源
    最近更新 更多