简体   繁体   English

在文本字段中键入字符串时键盘不可见

[英]Keyboard is not visible when typing a string in a text field

Im trying to automate a scenario on iOS 10.3 via appium(XCUI Test) where I have to type a phone number. 我试图通过appium(XCUI Test)在iOS 10.3上自动执行一个方案,在该方案中我必须输入电话号码。 But there's no keyboard is visible. 但是没有键盘可见。 All I have is a numberPad type keyboard. 我所拥有的只是一个numberPad型键盘。

I use selenium sendkeys function and it works perfectly with other textfields which I get the keyboard visible. 我使用selenium sendkeys函数,它与其他可以使键盘可见的文本字段完美配合。

I get the error as follows. 我得到如下错误。

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 .

Just add below steps 只需添加以下步骤

  1. Open your Simulator 打开模拟器
  2. Select Hardware 选择硬件
  3. Select 'Toggle Software Keyboard' 选择“切换软件键盘”

    as shown in Image 如图所示 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM