1 Reply
      Latest reply: Oct 9, 2016 7:45 AM by eskimo RSS
      lsraymond2 Level 1 Level 1 (0 points)

        I am able to build our company's app manually without any problem. However, when I run the UI Test I had written, it triggers an error saying that

         

        
        2016-10-04 11:21:55.147 bl_ios[17457:126224] -[__NSCFString absoluteString]: unrecognized selector sent to instance 0x6000004e5a80
        2016-10-04 11:21:55.153 bl_ios[17457:126224] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString absoluteString]: unrecognized selector sent to instance 0x6000004e5a80'
        *** First throw call stack:
        (
          0   CoreFoundation                      0x000000010537d34b __exceptionPreprocess + 171
          1   libobjc.A.dylib                     0x000000010b13c21e objc_exception_throw + 48
          2   CoreFoundation                      0x00000001053ecf34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
          3   CoreFoundation                      0x0000000105302c15 ___forwarding___ + 1013
          4   CoreFoundation                      0x0000000105302798 _CF_forwarding_prep_0 + 120
          5   bl_ios                              0x0000000101ae2d40 -[TTTAttributedLabelLink accessibilityValue] + 288
          6   bl_ios                              0x0000000101adc8e7 -[TTTAttributedLabel accessibilityElements] + 1495
          7   bl_ios                              0x0000000101adc1db -[TTTAttributedLabel accessibilityElementCount] + 43
          8   UIAccessibility                     0x000000011cfb8924 -[NSObject(AXPrivCategory) _accessibilityHasOrderedChildren] + 46
          9   UIAccessibility                     0x000000011cfb17e9 -[UIView(UIAccessibilityElementTraversal) _accessibilityShouldBeAddedToViewChildrenWithOptions:] + 154
          10  UIAccessibility                     0x000000011cfb24d1 -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 87
          11  UIAccessibility                     0x000000011cfb27ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
          12  UIAccessibility                     0x000000011cfb2cef +[UIView(UIAccessibilityElementTraversal) _accessibilityElementsAndContainersDescendingFromViews:options:sorted:] + 472
          13  UIAccessibility                     0x000000011cfb2ea4 -[UIView(UIAccessibilityElementTraversal) _accessibilityViewChildrenWithOptions:] + 186
          14  UIKit                               0x000000011ce4cd7f -[UIViewAccessibility _accessibilitySortedElementsWithin] + 64
          15  UIKit                               0x000000011ce7e760 -[UICollectionViewCellAccessibility _accessibilityChildren] + 244
          16  UIKit                               0x000000011ce7e9c6 -[UICollectionViewCellAccessibility accessibilityElementCount] + 90
          17  UIKit                               0x000000011ce8fa64 -[UICollectionViewCellAccessibilityElement accessibilityElementCount] + 48
          18  UIAccessibility                     0x000000011cfb8924 -[NSObject(AXPrivCategory) _accessibilityHasOrderedChildren] + 46
          19  UIAccessibility                     0x000000011cfd9e1c -[NSObject(UIAccessibilityAutomation) _accessibilityUserTestingChildrenCount] + 30
          20  UIAccessibility                     0x000000011cfbff86 -[NSObject(AXPrivCategory) accessibilityAttributeValue:] + 5707
          21  UIAccessibility                     0x000000011cfdab2d -[NSObject(UIAccessibilityAutomation) _accessibilityUserTestingSnapshotDescendantsWithAttributes:maxDepth:maxChildren:maxArrayCount:] + 1814
          22  UIAccessibility                     0x000000011cfdc48d -[NSObject(UIAccessibilityAutomation) _accessibilityUserTestingSnapshotWithOptions:] + 557
          23  UIAccessibility                     0x000000011cfbe292 -[NSObject(AXPrivCategory) accessibilityAttributeValue:forParameter:] + 7903
          24  UIAccessibility                     0x000000011cfa84ae _copyParameterizedAttributeValueCallback + 211
          25  AXRuntime                           0x000000011c866cbc _AXXMIGCopyParameterizedAttributeValue + 216
          26  AXRuntime                           0x000000011c8616a5 _XCopyParameterizedAttributeValue + 447
          27  AXRuntime                           0x000000011c870545 mshMIGPerform + 266
          28  CoreFoundation                      0x000000010530ef89 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
          29  CoreFoundation                      0x000000010530ef01 __CFRunLoopDoSource1 + 465
          30  CoreFoundation                      0x0000000105307045 __CFRunLoopRun + 2389
          31  CoreFoundation                      0x0000000105306494 CFRunLoopRunSpecific + 420
          32  GraphicsServices                    0x000000010d130a6f GSEventRunModal + 161
          33  UIKit                               0x0000000108703f34 UIApplicationMain + 159
          34  bl_ios                              0x0000000100e830ef main + 111
          35  libdyld.dylib                       0x000000010bfcd68d start + 1
        )
        libc++abi.dylib: terminating with uncaught exception of type NSException
        

         

        Note: This crash also occurs every time I want to record a test and interacting with elements.

        • Re: Unable to Launch Apps in UI Test - XCode 8
          eskimo Apple Staff Apple Staff (7,190 points)

          -[__NSCFString absoluteString]: unrecognized selector sent to …

          -absoluteString is an NSURL method name and this exception indicates that you’re calling it on a string.  The immediate cause of this is in the backtrace:

          …
          4  CoreFoundation … _CF_forwarding_prep_0 + 120 
          5  bl_ios        … -[TTTAttributedLabelLink accessibilityValue] + 288 
          …
          

          This is code that you control and you should debug things from there.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"