#4969·Detox

iOS formSheet presentation: content not visible in Detox's view hierarchy

Author: lidiakitCreated Aug 11, 2026Updated Aug 11, 2026

What's happening

We use React Navigation's native-stack presentation: 'formSheet' (via react-native-screens) for an in-app action sheet. In production this renders correctly, but under Detox, the formSheet's content never appears in the view hierarchy Detox reads — element(by.id(...))/by.text(...) inside the sheet always fail with "no elements found," even though the sheet is visibly present on screen (confirmed via screenshot artifacts).

What we'd expect

Detox to be able to locate and interact with elements rendered inside a formSheet-presented screen, the same way it can with other presentation types (modal, card, transparentModal, etc).

Steps to reproduce

  1. Use React Navigation native-stack with a screen configured presentation: 'formSheet' (via react-native-screens)
  2. Present that screen
  3. Attempt to match any element inside it with Detox (element(by.id(...)) / element(by.text(...)))
  4. Screenshot artifact confirms the sheet is visually on screen; the element still fails to match

Current workaround

We swap the presentation to transparentModal only under our E2E build flag, so tests exercise a JS-modal stand-in instead of the real formSheet:

typescript
presentation: IS_E2E ? 'transparentModal' : 'formSheet',

This lets us test something, but it's not what ships to users — if a bug were specific to formSheet's rendering/sizing/animation, our suite would stay green while the real thing broke.

Environment

  • Detox version: 20.47.0
  • React Native version: 0.83.0
  • react-native-screens version: 4.22.0
  • Platform: iOS
  • New Architecture (Fabric): enabled

Question for maintainers

Is this a known limitation (native UISheetPresentationController/formSheet rendering in a context outside Detox's traversable hierarchy), or is there a supported way to make formSheet-presented content visible to Detox that we're missing? Couldn't find any prior issue about this, so filing in case it helps others hit the same gap.