Currently, using Appium desktop 1.6.5 on OS X 10.12.6 with iPhone simulator. I am able to use inspector and record my interactions in ruby withy my company iOS mobile application. Unfortunately, when I playback my recording the scripts stops when trying to access table element el2 (see code below) and displays error message XCTRunner[1830:67966] Enqueue Failure: Failure fetching attributes for element Device element: Error Domain=XCTDaemonErrorDomain Code=13 "Error copying attributes (see log below). Any help would be greatly appreciated.
require ‘rubygems’
require ‘appium_lib’
caps = {}
caps[“platformName”] = “iOS”
caps[“platformVersion”] = “10.3.1 (14E8301)”
caps[“deviceName”] = “iPhone 6s”
caps[“app”] = “/Users/example/Desktop/Example QA.app”
caps[“browserName”] = “undefined” # Add undefined manually
caps[“newCommandTimeout”] = 300
caps[“udid”] = “15212345-3250-40E2-8B01-D08289E12345”
opts = {
sauce_username: nil,
server_url: “http://localhost:4723/wd/hub”
}
driver = Appium::Driver.new({caps: caps, appium_lib: opts}).start_driver
el1 = driver.find_element(:xpath, “//XCUIElementTypeButton[@name=“Allow”]”)
el1.click
el2 = driver.find_element(:xpath, “//XCUIElementTypeStaticText[@name=“Register”]”)
el2.click
el3 = driver.find_element(:xpath, “//XCUIElementTypeTextField[@name=“Email”]”)
el3.click
el3.send_keys “example@example”
el4 = driver.find_element(:xpath, “//XCUIElementTypeSecureTextField[@name=“Password”]”)
el4.click
el4.send_keys “12345”
el5 = driver.find_element(:xpath, “//XCUIElementTypeTextField[@name=“Zip Code”]”)
el5.click
el5.send_keys “12345”
el6 = driver.find_element(:xpath, “//XCUIElementTypeApplication[@name=“Example QA”]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeTable”)
el6.click
driver.quit
[Xcode] 2017-08-08 14:00:30.137 XCTRunner[1830:67966] Enqueue Failure: Failure fetching attributes for element Device element: Error Domain=XCTDaemonErrorDomain Code=13 “Error copying attributes -25202” UserInfo={NSLocalizedDescription=Error copying attributes -25202} /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 35 1
[Xcode] 2017-08-08 14:00:30.139 XCTRunner[1830:67966] Failed to fetch hit point for Other 0x60000017c800: {{0.0, 0.0}, {750.0, 1334.0}} - *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]
[Xcode] 2017-08-08 14:00:30.165 XCTRunner[1830:67966] Enqueue Failure: Failure fetching attributes for element Device element: Error Domain=XCTDaemonErrorDomain Code=13 "Error copying attributes
[JSONWP Proxy] Got response with status 200: {“value”:{“using”:“xpath”,“value”:"//XCUIElementTypeStaticText[@name=“Register”]",“description”:“unable to find an element”},“sessionId”:“276CE35A-A7CA-4674-9FC4-14B7061287B5”,“status”:7}
[HTTP] <-- POST /wd/hub/session/fc8fcd0a-6396-4a14-9ef9-c29ec73d9c2f/element 500 1365 ms - 164