【问题标题】:Keyboard is not visible when typing a string in a text field在文本字段中键入字符串时键盘不可见
【发布时间】:2017-11-15 06:27:20
【问题描述】:

我试图通过 appium(XCUI Test) 在 iOS 10.3 上自动化一个场景,我必须在其中输入电话号码。但是没有可见的键盘。我只有一个数字键盘类型的键盘。

我使用 selenium sendkeys 函数,它与其他文本字段完美配合,我可以看到键盘。

我得到如下错误。

An unknown server-side error occurred while processing the command. Original error: Error Domain=com.facebook.WebDriverAgent Code=1 "Keyboard is not present" UserInfo={NSLocalizedDescription=Keyboard is not present} (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 11.00 seconds .

【问题讨论】:

  • 你在设备或模拟器上工作吗?我认为必须在设备上
  • 我正在使用模拟器... xCode 模拟器
  • 你应该使用真实设备,或者在模拟器中转到:模拟器顶部菜单Hardware-> Keyboard- > ToggleSoftwareKeyBoard@IshiSilva
  • 在模拟器中按:cmd + shift + k
  • 我没有看到那个选项。我只看到“使用与 macOS 相同的布局”和“使用硬件键盘”:(

标签: ios xcode selenium sendkeys appium-ios


【解决方案1】:

只需添加以下步骤

  1. 打开你的模拟器

  2. 选择硬件

  3. 选择“切换软件键盘”

    如图

【讨论】:

  • 您节省了几天的搜索时间!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-05-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多