Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextInput label/id not getting picked up in detox #667

Closed
stephmilovic opened this issue Apr 10, 2018 · 4 comments
Closed

TextInput label/id not getting picked up in detox #667

stephmilovic opened this issue Apr 10, 2018 · 4 comments

Comments

@stephmilovic
Copy link

Description

I am just setting up Detox and user error is possible... that being said, I think I'm doing this right. I have a TextInput element with both accessibilityLabel and testID set to email. However, detox cannot find UI element with by.id or by.label. The curious part is, I can find my identifier in xcode's view hierarchy. I'm not sure where to go from here? I've attached screenshots of the view hierarchy. Opening a ticket because 1: this could be an actual bug. 2: if it's not a bug and I'm doing something wrong, debugging strategies should be documented if you are able to see your identifier in the view hierarchy but not get it in the detox tests

screen shot 2018-04-10 at 5 09 44 pm
screen shot 2018-04-10 at 5 10 07 pm

Steps to Reproduce

As you can see, I'm attempting with both by.label and by.idMy test is:

describe('Boot and sign in', () => {
    beforeEach(async () => {
        await device.reloadReactNative();
    });

    it('should have welcome screen', async () => {
        await expect(element(by.label('Login'))).toBeVisible();
    });

    it('should show login screen after tap', async () => {
        await element(by.label('Login')).tap();
        await expect(element(by.label('login-signin'))).toBeVisible();
    });

    it('should sign in and land on the homepage', async () => {
        await expect(element(by.label('email'))).toBeVisible();
        await element(by.label('email')).typeText('email@email.com');
        await element(by.label('password')).typeText('aaaaaa');
        await element(by.label('Sign in button')).tap();
        await expect(element(by.label('HOME'))).toBeVisible();
    });

    it('should sign in and land on the homepage', async () => {
        await expect(element(by.id('email'))).toBeVisible();
        await element(by.id('email')).typeText('email@email.com');
        await element(by.id('password')).typeText('aaaaaa');
        await element(by.id('Sign in button')).tap();
        await expect(element(by.id('HOME'))).toBeVisible();
    });
});

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 7.3.3
  • React Native: 0.54.2
  • Node: 8.11.1
  • Device: iPhone 7
  • Xcode: 9.3
  • macOS: 10.13.3

Device and verbose Detox logs

detox test --loglevel verbose
node_modules/.bin/jest e2e --config=e2e/config.json --runInBand --testNamePattern='^((?!:android:).)*$'
 server listening on localhost:57158...
 onOpen [object Object]
 send: {"type":"login","params":{"sessionId":"72e7db99-b2bf-0262-aa8e-6a22a5f06b2e","role":"tester"},"messageId":0}
 onMessage: {"type":"loginSuccess","params":{"sessionId":"72e7db99-b2bf-0262-aa8e-6a22a5f06b2e","role":"tester"},"messageId":0}
  rbx
 : applesimutils --list "iPhone 7" --maxResults=1
 : Searching for device matching iPhone 7...
 [ stdout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 7",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-7"
     },ut:
     "state" : "Booted",
     "availability" : "(available)",
     "name" : "iPhone 7",
     "udid" : "C978D6DE-8373-4550-B3C9-25A8FB9FDB99",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   }tdout:
 ] stdout:
 : stdout:
 : applesimutils --list
 [ stdout:
   {tdout:
     "deviceType" : {
       "name" : "Apple TV",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "Apple TV",
     "udid" : "98CBDDA6-348C-424F-81F0-1845DA406FC3",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "tvOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.tvOS-11-3",
       "buildversion" : "15L211"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "Apple TV 4K",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-4K"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "Apple TV 4K",
     "udid" : "0E701B6E-F25B-48E7-99C8-39D934257A85",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "tvOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.tvOS-11-3",
       "buildversion" : "15L211"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "Apple TV 4K (at 1080p)",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-1080p"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "Apple TV 4K (at 1080p)",
     "udid" : "F5A4F690-B697-48CE-99B8-817B161BA5A4",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "tvOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.tvOS-11-3",
       "buildversion" : "15L211"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPad (5th generation)",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPad--5th-generation-"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPad (5th generation)",
     "udid" : "30C600E7-4871-4C2E-85E5-E1A34CB90366",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPad Air",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPad-Air"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPad Air",
     "udid" : "CDE5B8C6-07E3-4C80-BF89-458826C0A89E",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPad Air 2",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPad-Air-2"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPad Air 2",
     "udid" : "76A5F520-5196-4312-8F35-DB4F5BBE5ED0",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPad Pro (10.5-inch)",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--10-5-inch-"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPad Pro (10.5-inch)",
     "udid" : "F90BAA70-DEBB-4174-97AD-58C5C9E806DE",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPad Pro (12.9-inch)",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPad-Pro"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPad Pro (12.9-inch)",
     "udid" : "E6BBB6E3-D7B8-47E9-A2D2-4FC673E8082D",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPad Pro (12.9-inch) (2nd generation)",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPad Pro (12.9-inch) (2nd generation)",
     "udid" : "508A7110-881C-4761-9B0F-AA1D78FD08E2",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPad Pro (9.7-inch)",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPad Pro (9.7-inch)",
     "udid" : "DC6384F1-5E37-4B20-85DA-0B968C184B1D",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 5s",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-5s"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone 5s",
     "udid" : "07129EEC-055D-4B7E-81BE-C3F3A8B7DC75",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 6",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-6"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone 6",
     "udid" : "1F0D28DC-DDFB-40AD-B956-A6E565A2683D",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 6 Plus",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone 6 Plus",
     "udid" : "C0BC9404-F92A-439F-89F0-2B7412DDA6F8",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 6s",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-6s"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone 6s",
     "udid" : "3CEAE5DD-8E8F-4858-B3CA-5449A786061D",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 6s Plus",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone 6s Plus",
     "udid" : "96305443-4586-4142-B492-3E2F42657346",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 7",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-7"
     },ut:
     "state" : "Booted",
     "availability" : "(available)",
     "name" : "iPhone 7",
     "udid" : "C978D6DE-8373-4550-B3C9-25A8FB9FDB99",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 7 Plus",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone 7 Plus",
     "udid" : "2E0447D0-FF01-4874-AC23-57BBDC263B87",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 8",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-8"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone 8",
     "udid" : "597E9FAC-2860-4C18-98C9-2620F25A81BB",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone 8 Plus",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone 8 Plus",
     "udid" : "2CC38CA2-2B10-4FEC-B736-B6A31BE0E229",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone SE",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-SE"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone SE",
     "udid" : "01E31F33-EE1D-4FC1-82BD-077D88DF1DC1",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "iPhone X",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-X"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "iPhone X",
     "udid" : "7BA96AB7-AF75-4209-BEF0-27E0F6CE3C6F",
     "os" : {
       "version" : "11.3",
       "availability" : "(available)",
       "name" : "iOS 11.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-3",
       "buildversion" : "15E217"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "Apple Watch - 38mm",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "Apple Watch - 38mm",
     "udid" : "5448D74E-2D34-4722-ADE5-23D97AAF401A",
     "os" : {
       "version" : "4.3",
       "availability" : "(available)",
       "name" : "watchOS 4.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.watchOS-4-3",
       "buildversion" : "15T212"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "Apple Watch - 42mm",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "Apple Watch - 42mm",
     "udid" : "D31C5F97-58EC-4269-95A3-9B47DF8A6D61",
     "os" : {
       "version" : "4.3",
       "availability" : "(available)",
       "name" : "watchOS 4.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.watchOS-4-3",
       "buildversion" : "15T212"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "Apple Watch Series 2 - 38mm",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "Apple Watch Series 2 - 38mm",
     "udid" : "86DF6E17-4E20-4128-8203-88690D2A58EC",
     "os" : {
       "version" : "4.3",
       "availability" : "(available)",
       "name" : "watchOS 4.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.watchOS-4-3",
       "buildversion" : "15T212"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "Apple Watch Series 2 - 42mm",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "Apple Watch Series 2 - 42mm",
     "udid" : "AAEB5B2C-95E7-42BE-9104-7A6DBE395603",
     "os" : {
       "version" : "4.3",
       "availability" : "(available)",
       "name" : "watchOS 4.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.watchOS-4-3",
       "buildversion" : "15T212"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "Apple Watch Series 3 - 38mm",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-38mm"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "Apple Watch Series 3 - 38mm",
     "udid" : "A5FB20B9-3FC6-4FD5-A956-775323D9C5E2",
     "os" : {
       "version" : "4.3",
       "availability" : "(available)",
       "name" : "watchOS 4.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.watchOS-4-3",
       "buildversion" : "15T212"
     }out:
   },dout:
   {tdout:
     "deviceType" : {
       "name" : "Apple Watch Series 3 - 42mm",
       "identifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-42mm"
     },ut:
     "state" : "Shutdown",
     "availability" : "(available)",
     "name" : "Apple Watch Series 3 - 42mm",
     "udid" : "EA820DDC-4582-4A51-9C4D-BB6C0B213B6F",
     "os" : {
       "version" : "4.3",
       "availability" : "(available)",
       "name" : "watchOS 4.3",
       "identifier" : "com.apple.CoreSimulator.SimRuntime.watchOS-4-3",
       "buildversion" : "15T212"
     }out:
   }tdout:
 ] stdout:
 : stdout:
 : /usr/bin/xcrun simctl uninstall C978D6DE-8373-4550-B3C9-25A8FB9FDB99 com.craftsy.membership
 : Uninstalling com.craftsy.membership...
 : com.craftsy.membership uninstalled
4: /usr/bin/xcrun simctl install C978D6DE-8373-4550-B3C9-25A8FB9FDB99 "/Users/steph.milovic/dev/craftsy-components/workspaces/member hip/ios/Build/Build/Products/Debug-iphonesimulator/Membership.app"
4: Installing /Users/steph.milovic/dev/craftsy-components/workspaces/membership/ios/Build/Build/Products/Debug-iphonesimulator/Membe ship.app...
4: /Users/steph.milovic/dev/craftsy-components/workspaces/membership/ios/Build/Build/Products/Debug-iphonesimulator/Membership.app i stalled
 : /usr/bin/xcrun simctl terminate C978D6DE-8373-4550-B3C9-25A8FB9FDB99 com.craftsy.membership
 : Terminating com.craftsy.membership...
 : com.craftsy.membership terminated
6: /bin/cat /dev/null >$HOME/Library/Developer/CoreSimulator/Devices/C978D6DE-8373-4550-B3C9-25A8FB9FDB99/data/tmp/detox.last_launch_app_log.out 2>$HOME/Library/Developer/CoreSimulator/Devices/C978D6DE-8373-4550-B3C9-25A8FB9FDB99/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/steph.milovic/Library/Detox/ios/4005a62c1ae37f4de9e9541ecb9bf9249b63e5b6/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err C978D6DE-8373-4550-B3C9-25A8FB9FDB99 com.craftsy.membership --args -detoxServer ws://localhost:57158 -detoxSessionId 72e7db99-b2bf-0 62-aa8e-6a22a5f06b2e
 : Launching com.craftsy.membership...
 com.craftsy.membership: 186
 : stdout:
6: com.craftsy.membership launched. The stdout and stderr logs were recreated, you can watch them with:
        tail -F $HOME/Library/Developer/CoreSimulator/Devices/C978D6DE-8373-4550-B3C9-25A8FB9FDB99/data/tmp/detox.last_launch_app_lo .{out,err}
 send: {"type":"isReady","params":{},"messageId":-1000}
 onMessage: {"type":"ready","messageId":-1000,"params":{}}
  rbx
 send: {"type":"reactNativeReload","params":{},"messageId":-1000}
 onMessage: {"type":"ready","messageId":-1000,"params":{}}
  rbx
 send: {"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detox_matcherForAccessibilityLabel:","args":[{"type":"NSString","value":"Login"}]}}]}},"method":"assertWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"matcherForSufficientlyVisible","args":[]}}]},"messageId":1}
 onMessage: {"type":"invokeResult","messageId":1,"params":{"result":"(GREYElementInteraction)"}}
  rbx
 send: {"type":"reactNativeReload","params":{},"messageId":-1000}
 onMessage: {"type":"ready","messageId":-1000,"params":{}}
  rbx
 send: {"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detox_matcherForAccessibilityLabel:","args":[{"type":"NSString","value":"Login"}]}}]}},"method":"performAction:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYActions"},"method":"actionForTap","args":[]}}]},"messageId":2}
 onMessage: {"type":"invokeResult","messageId":2,"params":{"result":"(GREYElementInteraction)"}}
  rbx
 send: {"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detox_matcherForAccessibilityLabel:","args":[{"type":"NSString","value":"login-signin"}]}}]}},"method":"assertWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"matcherForSufficientlyVisible","args":[]}}]},"messageId":3}
 onMessage: {"type":"invokeResult","messageId":3,"params":{"result":"(GREYElementInteraction)"}}
  rbx
 send: {"type":"reactNativeReload","params":{},"messageId":-1000}
 onMessage: {"type":"ready","messageId":-1000,"params":{}}
  rbx
 send: {"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detox_matcherForAccessibilityLabel:","args":[{"type":"NSString","value":"email"}]}}]}},"method":"assertWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"matcherForSufficientlyVisible","args":[]}}]},"messageId":4}
 onMessage: {"type":"testFailed","messageId":4,"params":{"details":"Cannot find UI Element.\nException with Assertion: {\n  \"Assertion Criteria\" : \"assertWithMatcher:matcherForSufficientlyVisible(>=0.750000)\",\n  \"Element Matcher\" : \"(((((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel('email')) && !(descendantThatMatches((kindOfClass('RCTTextView') && ((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel('email')))))) && !(kindOfClass('RCTScrollView'))) || (kindOfClass('UIScrollView') && ((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) && ancestorThatMatches(((((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel('email')) && !(descendantThatMatches((kindOfClass('RCTTextView') && ((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel('email')))))) && kindOfClass('RCTScrollView'))))))\",\n  \"Recovery Suggestion\" : \"Check if the element exists in the UI hierarchy printed below. If it exists, adjust the matcher so that it accurately matches element.\"\n}\n\nError Trace: [\n  {\n    \"Description\" : \"Interaction cannot continue because the desired element was not found.\",\n    \"Error Domain\" : \"com.google.earlgrey.ElementInteractionErrorDomain\",\n    \"Error Code\" : \"0\",\n    \"File Name\" : \"GREYElementInteraction.m\",\n    \"Function Name\" : \"-[GREYElementInteraction matchedElementsWithTimeout:error:]\",\n    \"Line\" : \"124\"\n  }\n]"}}
  rbx
 send: {"type":"reactNativeReload","params":{},"messageId":-1000}
 onMessage: {"type":"ready","messageId":-1000,"params":{}}
  rbx
 send: {"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"matcherForAccessibilityID:","args":[{"type":"NSString","value":"email"}]}}]}},"method":"assertWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"matcherForSufficientlyVisible","args":[]}}]},"messageId":5}
 onMessage: {"type":"testFailed","messageId":5,"params":{"details":"Cannot find UI Element.\nException with Assertion: {\n  \"Assertion Criteria\" : \"assertWithMatcher:matcherForSufficientlyVisible(>=0.750000)\",\n  \"Element Matcher\" : \"(((respondsToSelector(accessibilityIdentifier) && accessibilityID('email')) && !(kindOfClass('RCTScrollView'))) || (kindOfClass('UIScrollView') && ((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) && ancestorThatMatches(((respondsToSelector(accessibilityIdentifier) && accessibilityID('email')) && kindOfClass('RCTScrollView'))))))\",\n  \"Recovery Suggestion\" : \"Check if the element exists in the UI hierarchy printed below. If it exists, adjust the matcher so that it accurately matches element.\"\n}\n\nError Trace: [\n  {\n    \"Description\" : \"Interaction cannot continue because the desired element was not found.\",\n    \"Error Domain\" : \"com.google.earlgrey.ElementInteractionErrorDomain\",\n    \"Error Code\" : \"0\",\n    \"File Name\" : \"GREYElementInteraction.m\",\n    \"Function Name\" : \"-[GREYElementInteraction matchedElementsWithTimeout:error:]\",\n    \"Line\" : \"124\"\n  }\n]"}}
  rbx
 send: {"type":"cleanup","params":{"stopRunner":false},"messageId":6}
 onMessage: {"type":"cleanupDone","messageId":6,"params":{}}
  rbx
 FAIL  e2e/app.test.js (16.663s)
  Boot and sign in
    ✓ should have welcome screen (1476ms)
    ✓ should show login screen after tap (2087ms)
    ✕ should sign in and land on the homepage (1485ms)
    ✕ should sign in and land on the homepage (1252ms)

  ● Boot and sign in › should sign in and land on the homepage

    Error: Cannot find UI Element.
    Exception with Assertion: {
      "Assertion Criteria" : "assertWithMatcher:matcherForSufficientlyVisible(>=0.750000)",
      "Element Matcher" : "(((((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel('email')) && !(descendantThatMatches((kindOfClass('RCTTextView') && ((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel('email')))))) && !(kindOfClass('RCTScrollView'))) || (kindOfClass('UIScrollView') && ((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) && ancestorThatMatches(((((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel('email')) && !(descendantThatMatches((kindOfClass('RCTTextView') && ((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel('email')))))) && kindOfClass('RCTScrollView'))))))",
      "Recovery Suggestion" : "Check if the element exists in the UI hierarchy printed below. If it exists, adjust the matcher so that it accurately matches element."
    }

    Error Trace: [
      {
        "Description" : "Interaction cannot continue because the desired element was not found.",
        "Error Domain" : "com.google.earlgrey.ElementInteractionErrorDomain",
        "Error Code" : "0",
        "File Name" : "GREYElementInteraction.m",
        "Function Name" : "-[GREYElementInteraction matchedElementsWithTimeout:error:]",
        "Line" : "124"
      }
    ]

      at Client.execute (../node_modules/detox/src/client/Client.js:72:13)

  ● Boot and sign in › should sign in and land on the homepage

    Error: Cannot find UI Element.
    Exception with Assertion: {
      "Assertion Criteria" : "assertWithMatcher:matcherForSufficientlyVisible(>=0.750000)",
      "Element Matcher" : "(((respondsToSelector(accessibilityIdentifier) && accessibilityID('email')) && !(kindOfClass('RCTScrollView'))) || (kindOfClass('UIScrollView') && ((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) && ancestorThatMatches(((respondsToSelector(accessibilityIdentifier) && accessibilityID('email')) && kindOfClass('RCTScrollView'))))))",
      "Recovery Suggestion" : "Check if the element exists in the UI hierarchy printed below. If it exists, adjust the matcher so that it accurately matches element."
    }

    Error Trace: [
      {
        "Description" : "Interaction cannot continue because the desired element was not found.",
        "Error Domain" : "com.google.earlgrey.ElementInteractionErrorDomain",
        "Error Code" : "0",
        "File Name" : "GREYElementInteraction.m",
        "Function Name" : "-[GREYElementInteraction matchedElementsWithTimeout:error:]",
        "Line" : "124"
      }
    ]

      at Client.execute (../node_modules/detox/src/client/Client.js:72:13)

Test Suites: 1 failed, 1 total
Tests:       2 failed, 2 passed, 4 total
Snapshots:   0 total
Time:        17.536s
Ran all test suites matching /e2e/i with tests matching "^((?!:android:).)*$".
child_process.js:644
    throw err;
    ^

Error: Command failed: node_modules/.bin/jest e2e --config=e2e/config.json --runInBand --testNamePattern='^((?!:android:).)*$'
    at checkExecSyncError (child_process.js:601:13)
    at Object.execSync (child_process.js:641:13)
    at runJest (/usr/local/lib/node_modules/detox/local-cli/detox-test.js:110:6)
    at run (/usr/local/lib/node_modules/detox/local-cli/detox-test.js:67:7)
    at Object.<anonymous> (/usr/local/lib/node_modules/detox/local-cli/detox-test.js:54:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
@stephmilovic
Copy link
Author

jk

@esusslin
Copy link

Lol.

@esusslin
Copy link

@stephmilovic - by jk.. were you able to locate the TextInput via a selector? Currently experiencing a similar issue

@ilonashub
Copy link

I don't know if it might help someone, but I had the same issue - and turns up that my simulator was not being updated with the new bundle... I had to turn it off and rub the build again to make it work :/

@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants