无法通过';按id'查找元素;在Appium ruby(本机iOS应用程序)中实现自动化?
在应用程序中获取以下错误无法通过';按id'查找元素;在Appium ruby(本机iOS应用程序)中实现自动化?,ios,ruby,automation,cucumber,appium-ios,Ios,Ruby,Automation,Cucumber,Appium Ios,在应用程序中获取以下错误 REMOTE] Could not connect to WebKitRemoteDebugger server info: --> GET /wd/hub/session/81921036-ccb1-4ca3-9b97-319145e345fe/contexts {} info: [debug] [REMOTE] Getting WebKitRemoteDebugger pageArray info: [debug] Responding to client
REMOTE] Could not connect to WebKitRemoteDebugger server
info: --> GET /wd/hub/session/81921036-ccb1-4ca3-9b97-319145e345fe/contexts {}
info: [debug] [REMOTE] Getting WebKitRemoteDebugger pageArray
info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command. (Original error: connect ECONNREFUSED)","code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","origValue":"connect ECONNREFUSED"},"sessionId":"81921036-ccb1-4ca3-9b97-319145e345fe"}
info: <-- GET /wd/hub/session/81921036-ccb1-4ca3-9b97-319145e345fe/contexts 500 2.415 ms - 293
REMOTE]无法连接到WebKitRemoteDebugger服务器
信息:-->GET/wd/hub/session/81921036-ccb1-4ca3-9b97-319145e345fe/contexts{}
信息:[调试][远程]正在获取WebKitRemoteDebugger页面数组
信息:[调试]响应客户端时出现错误:{“状态”:13,“值”:{“消息”:“处理命令时发生未知服务器端错误。(原始错误:connect ECONREFUNCE)”,“代码”:“ECONREFUNCE”,“错误号”:“ECONREFUNCE”,“系统调用”:“connect”,“origValue”:“connect ECONREFUNCE”},“会话ID”:“81921036-ccb1-4ca3-9b97-319145e345fe”}
信息:将您的xcode更新为8.x最新版本。
将应用程序更新至1.6.4最新版本。
将appium_lib gem版本更新为最新版本
安装appium_doctor
npm install -g appium-doctor
appium-doctor --ios
这将检查appium ios设置的运行状况
然后以XUITest而不是UIAutomator的形式运行测试
以下是您可以使用的功能:
您需要使用功能
caps = {
:platformName => "iOS",
:deviceName => "iPhone 6",
:platformVersion => "9.3",
:app => app_path,
:noReset => 'true',
:newCommandTimeout => "30",
:automationName => "XCUITest",
:sendKeyStrategy => 'setValue'
}
完成后,一旦appium启动,只需像普通web元素一样查找您的元素
driver.find_元素(id:'dob')。单击
希望能有帮助 您好,请更新您的问题,提供更多详细信息,例如,您用来启动appium的代码、元素的xml、webdriver版本等。@kaushal Rupani-我从$driver.start\u driver>开始,在测试开始之前启动appium驱动程序Elemet标签:标签:Security\u DOBTextFieldId
Ruby代码:(/^我点击标识符“([^”]*)”$/)do|arg|wait|u true{exists{find_element(id:arg)。单击}}}}end
你的iOS版本是什么?同时分享你正在使用的功能列表。@kaushalRupani iOS-9.3.2,我已经更新了问题中的功能。