12 Replies
      Latest reply on Oct 9, 2019 9:12 AM by Iwwnattoviewthefcukginresutls
      Henriqueark Level 1 Level 1 (0 points)

        Hi Guys!

         

        I`m having problem with UI Testing, using XCode 7.3.

         

        expression produced error: /var/folders/fn/v9qbg2dn1c5b_s_yxxh31qg80000gp/T/lldb/99599/expr24.swift:1:53: error: 'XCUIElement' is not a member type of 'XCTest'

         

        I have a main View with a (TableView and a View with a button). When I click in a cell at the TableView, it will refresh with some content in the View.

        It crashs when I click in another cell and (after refreshing the View content) try to press the button.

        This happens only when i try using UI Testing. Normally, the app works like a charm.

         

        Someone had the same problem?

        Thanks!

        • Re: 'XCUIElement' is not a member type of 'XCTest'
          Henriqueark Level 1 Level 1 (0 points)

          Maybe that`s the problem, but I don't know what to do

           

          file:///%3Cunknown%3E: test failure: -[ProductUITest testResgateProdutoSemSKU()] failed: UI Testing Failure - Failure getting snapshot Error Domain=XCTestManagerErrorDomain Code=9 "Error -25204 getting snapshot for element <AXUIElement 0x7b141df0> {pid=32577}" UserInfo={NSLocalizedDescription=Error -25204 getting snapshot for element <AXUIElement 0x7b141df0> {pid=32577}}

          • Re: 'XCUIElement' is not a member type of 'XCTest'
            damien.gavard Level 1 Level 1 (0 points)

            Same problem here with Xcode 8.0 (8A218a)

             

            expression produced error: /var/folders/pv/5jlpdzzn3p55w0ynccpt8x500000gn/T/lldb/37283/expr139.swift:1:53: error: 'XCUIElement' is not a member type of 'XCTest'
            $__lldb__DumpForDebugger(Swift.UnsafePointer<XCTest.XCUIElement>(bitPattern: 0x119244860).memory)
                                                         ~~~~~~ ^
            /var/folders/pv/5jlpdzzn3p55w0ynccpt8x500000gn/T/lldb/37283/expr139.swift:1:45: note: while parsing this '<' as a type parameter bracket
            $__lldb__DumpForDebugger(Swift.UnsafePointer<XCTest.XCUIElement>(bitPattern: 0x119244860).memory)
            

             

            The file expr139.swift content is :

             

            $__lldb__DumpForDebugger(Swift.UnsafePointer<XCTest.XCUIElement>(bitPattern: 0x119244860).memory)
            
            • Re: 'XCUIElement' is not a member type of 'XCTest'
              huangjieyc Level 1 Level 1 (0 points)

              I got the same problem in my automation test. I am using the xcode version 8.0(8A218a)

               

              I always get the error as below and the object that be printed by debugdescription could not be access through code

              xpression produced error: /var/folders/g5/wwmlnjw90432hmd_fls8q0fdwqlkkf/T/lldb/1342/expr30.swift:1:53: error: 'XCUIApplication' is not a member type of 'XCTest'

              $__lldb__DumpForDebugger(Swift.UnsafePointer<XCTest.XCUIApplication>(bitPattern: 0x104d88890).memory)

                                                           ~~~~~~ ^

              /var/folders/g5/wwmlnjw90432hmd_fls8q0fdwqlkkf/T/lldb/1342/expr30.swift:1:45: note: while parsing this '<' as a type parameter bracket

              $__lldb__DumpForDebugger(Swift.UnsafePointer<XCTest.XCUIApplication>(bitPattern: 0x104d88890).memory)

                                                          ^

              • Re: 'XCUIElement' is not a member type of 'XCTest'
                huangjieyc Level 1 Level 1 (0 points)

                does anyone know the solutions? the same code can run successfully in xcode 7.3.1. however, it could not run now in 8.0

                • Re: 'XCUIElement' is not a member type of 'XCTest'
                  NTV Level 1 Level 1 (0 points)

                  I have the same problem in XCode 8

                   

                  expression produced error: /var/folders/25/9_sb609576jcmgdbqt553ps08n5b5c/T/lldb/43074/expr40.swift:1:53: error: 'XCUIElement' is not a member type of 'XCTest'
                  $__lldb__DumpForDebugger(Swift.UnsafePointer<XCTest.XCUIElement>(bitPattern: 0x116a0b940).memory)
                                                               ~~~~~~ ^
                  /var/folders/25/9_sb609576jcmgdbqt553ps08n5b5c/T/lldb/43074/expr40.swift:1:45: note: while parsing this '<' as a type parameter bracket
                  $__lldb__DumpForDebugger(Swift.UnsafePointer<XCTest.XCUIElement>(bitPattern: 0x116a0b940).memory)
                  
                    • Re: 'XCUIElement' is not a member type of 'XCTest'
                      rahul.vaidya Level 1 Level 1 (0 points)

                      Receiving the same error in XCode Version 8.2.1 (8C1002).

                      If any one has found a solution to this, Please reply!

                       

                       

                      expression produced error: /var/folders/6x/zkx6q8_x0nb7tngb6f8dtb300000gp/T/lldb/2531/expr14.swift:1:53: error: 'XCUIElement' is not a member type of 'XCTest'

                      $__lldb__DumpForDebugger(Swift.UnsafePointer<XCTest.XCUIElement>(bitPattern: 0x11cd576e0).memory)

                                                                   ~~~~~~ ^

                      /var/folders/6x/zkx6q8_x0nb7tngb6f8dtb300000gp/T/lldb/2531/expr14.swift:1:45: note: while parsing this '<' as a type parameter bracket

                      $__lldb__DumpForDebugger(Swift.UnsafePointer<XCTest.XCUIElement>(bitPattern: 0x11cd576e0).memory)

                    • Re: 'XCUIElement' is not a member type of 'XCTest'
                      mhassan Level 1 Level 1 (0 points)

                      I had a very similar issue only when I try to print test related objects at the debugger prompt

                      (but it works normally If I just run the test and don't breakpoint with the debugger)

                      (I'm using Xcode 8.2.1)

                       

                      for example:

                       

                      I set a breakpoint just after this line:

                              let app = XCUIApplication()

                       

                      and then try


                      (lldb) po app

                      expression produced error: error: /var/folders/y0/1ghrk5gn4911s6kwq6n1ny8w0000gn/T/./lldb/2506/expr33.swift:1:72: error: 'XCUIApplication' is not a member type of 'XCTest'

                      Swift._DebuggerSupport.stringForPrintObject(Swift.UnsafePointer<XCTest.XCUIApplication>(bitPattern: 0x1214213b0)!.pointee)

                                                                                      ~~~~~~ ^

                       

                      but when I check debugDescription, it works

                       

                      (lldb) po app.debugDescription

                       

                      "Attributes: Application 0x608000176500: {{0.0, 0.0},

                      .

                      .

                       

                      then surprisingly, the same command that failed above works now successfully!

                       

                      (lldb) po app

                      Attributes: Application 0x608000176500: {{0.0, 0.0}, {375.0, 667.0}}

                      .

                      .

                       

                      I don't understand why, but it seems a workaround.

                      • Re: 'XCUIElement' is not a member type of 'XCTest'
                        neondm Level 1 Level 1 (0 points)

                        I had the same issue, but when I change device on which test run then everything works. I have Xcode 8.3.3 (8E3004b), and I tried to run a test on iOS 10.3.2 (14F89) and on it the same error occurs, but on iOS 10.3.1 (14E304) everything works fine.

                        • Re: 'XCUIElement' is not a member type of 'XCTest'
                          VictorF Level 1 Level 1 (0 points)

                          Hi guys , so did anyone managed to make this work ?