向文本字段发送值时出错

时间:2019-06-23 15:05:41

标签: appium appium-ios

在处理命令时发生未知的服务器端错误。原始错误:错误Domain = com.facebook.WebDriverAgent代码= 1“键盘不存在” UserInfo = {NSLocalizedDescription =键盘不存在}

  1. 尝试设置功能:cap.setCapability(“ connectHardwareKeyboard”,false);或ios_driver.getKeyboard();

  2. 手动禁用模拟器的硬件键盘。

    WD Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/F9134F7F-1C41-4B57-9326-EFB90C4AB07D/element] with body: {"using":"xpath","value":"//XCUIElementTypeStaticText[@name=\"First Name\"]"}

    [WD Proxy] Got response with status 200: {"value":{"ELEMENT":"EF020000-0000-0000-9F48-010000000000"},"sessionId":"F9134F7F-1C41-4B57-9326-EFB90C4AB07D","status":0}

    [W3C (85d875cd)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"EF020000-0000-0000-9F48-010000000000","ELEMENT":"EF020000-0000-0000-9F48-010000000000"}

    [HTTP] <-- POST /wd/hub/session/85d875cd-3c53-4c52-8b48-b6859bc4d96c/element 200 19881 ms - 137

    [HTTP]

    [HTTP] --> POST /wd/hub/session/85d875cd-3c53-4c52-8b48-b6859bc4d96c/element/EF020000-0000-0000-9F48-010000000000/value

    [HTTP] {"id":"EF020000-0000-0000-9F48-010000000000","text":"automativest","value":["a","u","t","o","m","a","t","i","v","e","s","t"]}

    [W3C (85d875cd)] Calling AppiumDriver.setValue() with args: [["a","u","t","o","m","a","t","i","v","e","s","t"],"EF020000-0000-0000-9F48-010000000000","85d875cd-3c53-4c52-8b48-b6859bc4d96c"]

    [XCUITest] Executing command 'setValue'

    [WD Proxy] Matched '/element/EF020000-0000-0000-9F48-010000000000/value' to command name 'setValue'

    [Protocol Converter] Added 'text' property "automativest" to 'setValue' request body

    [WD Proxy] Proxying [POST /element/EF020000-0000-0000-9F48-010000000000/value] to [POST http://localhost:8100/session/F9134F7F-1C41-4B57-9326-EFB90C4AB07D/element/EF020000-0000-0000-9F48-010000000000/value] with body: {"value":["a","u","t","o","m","a","t","i","v","e","s","t"],"text":"automativest"}

    [WD Proxy] Got response with status 200: {"value":"Error Domain=com.facebook.WebDriverAgent Code=1 \"Keyboard is not present\" UserInfo={NSLocalizedDescription=Keyboard is not present}","sessionId":"F9134F7F-1C41-4B57-9326-EFB90C4AB07D","status":13}

    [WD Proxy] Got an unexpected response: {"value":"Error Domain=com.facebook.WebDriverAgent Code=1 \"Keyboard is not present\" UserInfo={NSLocalizedDescription=Keyboard is not present}","sessionId":"F9134F7F-1C41-4B57-9326-EFB90C4AB07D","status":13}

0 个答案:

没有答案