Posts

Post not yet marked as solved
4 Replies
4.5k Views
Xcode version : Version 9.4.1 (9F2000)Currently I am testing an an app using Automation with XCTest Framework.I am running into a series of issues with the UI where the element says it is visible (exists) and isHittable (Both are true), but the next thing that shows up is an Assertion Failure. (Note: This doesn't happen for the same element everytime. Sometimes it works fine with one element and doesnt with the same element).Failed to determine hittability of "notification2:title" StaticText: Error copying attributes -25202I found this issue in earlier versions of Xcode too but the Assertion failure gave an error "Failure to determine hit point for the element".Thins that i have tried:-> Adding sleep before checking if the element is hittable or when tapping on the element.->Adding waitForExistenceWithTimeout before checking for the element or tapping on it.These didn't help me.Adding to the above, due to the nature of the app I can't test it on the simulator. I am testing it on a real device. And below is the log that i print before tapping or checking for the element. You can see element.exists and element.isHittable both return true but gives an Assertion failure.Checking for the element is visible and hittable before scrolling the parentElement. Element is Visible--YES, Element is hittable--YES
Posted
by vivek5605.
Last updated
.
Post not yet marked as solved
1 Replies
1.6k Views
I recently upgraded to Xcode 10.0.I am trying to search for elements in an app running on a device to perform UI testing. For some reason in Xcode 10 i am facing an issue with scrolling the tableView or scrollView or the UI window. Sometimes after scrolling few times the XCUItest Framework repeatedly is trying to scroll the window but nothing happens on the screen (no scrolling seems to appear).This is what it says:"Check for interrupting elements affecting"This will repeat for sometime but as I said there is no change in the UI.I have never seen this issue while working with Xcode 9.4.1.
Posted
by vivek5605.
Last updated
.
Post not yet marked as solved
0 Replies
1.1k Views
Xcode 9.2, Simulator 8 plus 11.2(tried with all the simulators): I am querying for an element on the screen, I can see it is visible and my debug log also says the element exists on the screen but, the UITestFramework is unable to find an element and sends an Assertion failure error.I have tried adding a sleep of 1 sec, it sometimes works but not everytime.Screen hierarchy printed in the logs:↪︎Find: Descendants matching type Button Output: { Button, 0x600000187840, traits: 8589934849, {{352.5, 72.0}, {6.5, 20.0}}, identifier: 'System:fwd_arr', label: 'arrow right' Button, 0x60000019d8e0, traits: 8589934849, {{352.5, 116.0}, {6.5, 20.0}}, identifier: 'Awake:fwd_arr', label: 'arrow right' Button, 0x6000001883a0, traits: 8589934849, {{352.5, 160.0}, {6.5, 20.0}}, identifier: 'Sensor:fwd_arr', label: 'arrow right' Button, 0x600000193db0, traits: 8589934849, {{352.5, 204.0}, {6.5, 20.0}}, identifier: 'Priority:fwd_arr', label: 'arrow right' Button, 0x60000019d190, traits: 8589934849, {{352.5, 248.0}, {6.5, 20.0}}, identifier: 'Random:fwd_arr', label: 'arrow right' Button, 0x60000019ff10, traits: 8589934849, {{352.5, 292.0}, {6.5, 20.0}}, identifier: 'Wifi:fwd_arr', label: 'arrow right'Query:t = 17555.64s Find: Elements matching predicate 'elementType == Button AND "Priority:fwd_arr" IN identifiers' t = 17555.65s Snapshot accessibility hierarchy for app with pid 38889 t = 17555.65s Find: Descendants matching type Button t = 17555.65s Find: Elements matching predicate 'elementType == Button AND "Priority:fwd_arr" IN identifiers' t = 17555.65s Snapshot accessibility hierarchy for app with pid 38889 t = 17555.65s Find: Descendants matching type Button t = 17555.65s Snapshot accessibility hierarchy for app with pid 38889 t = 17557.98s Find the "Priority:fwd_arr" Button t = 17558.06s Find the "Priority:fwd_arr" Button t = 17561.14s Tap "Priority:fwd_arr" Button[0.10, 0.10] t = 17561.14sWait for TestingApp to idle t = 17561.22s Find the "Priority:fwd_arr" Button t = 17561.40s Wait for TestingApp to idlet = 17563.77s Assertion Failure: UITests.m:1752: Failure fetching attributes for element <XCAccessibilityElement: 0x608000462280> pid: 38889, elementOrHash.elementID: 105553219486848.179888: Error Domain=XCTDaemonErrorDomain Code=13 "Error copying attributes -25202" UserInfo={NSLocalizedDescription=Error copying attributes -25202}Thanks for your help in advance.
Posted
by vivek5605.
Last updated
.