0

Using detox for tests for react-native for ios

I have a link

<TouchableOpacity onPress={() => onLinkPress(url)} testID={'someId'}>
  <Text>asd</Text>
</TouchableOpacity>

but can't click it with element(by.id('someId')).tap()

error

  Error: Error: Cannot perform action due to constraint(s) failure.
Exception with Action: {
  "Action Name" : "Tap",
  "Element Description" : "<RCTView:0x7f8d8fa34c30; AX=Y; AX.id='clade-member-profile-org-link-apple.com'; AX.label='Apple Investor apple.com'; AX.frame={{20, 699}, {280, 72}}; AX.activationPoint={160, 735}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {280, 72}}; opaque; alpha=1>",
  "Failed Constraint(s)" : "interactable",
  "All Constraint(s)" : "(!(isSystemAlertViewShown) && ((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) || kindOfClass('UIView')) && (enabled && !(((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) && ancestorThatMatches(!(enabled))))) && interactable)",
  "Recovery Suggestion" : "Adjust element properties so that it matches the failed constraint(s)."
}

[
  {
    "Description" : "Cannot perform action due to constraint(s) failure.",
    "Error Domain" : "com.google.earlgrey.ElementInteractionErrorDomain",
    "Error Code" : "1",
    "File Name" : "GREYBaseAction.m",
    "Function Name" : "-[GREYBaseAction satisfiesConstraintsForElement:error:]",
    "Line" : "66"
  }
]

Detox 7.1.0

why I can't click it?

beornborn
  • 202
  • 4
  • 17

1 Answers1

0

that was become that link was not visible (had to scroll down to make it appear on screen)

beornborn
  • 202
  • 4
  • 17