maestro icon indicating copy to clipboard operation
maestro copied to clipboard

Maestro not picking up id's for components other than buttons and text

Open antoniofranciscoandrade opened this issue 3 years ago • 1 comments
trafficstars

Building a react-native project and only buttons and text components are shown when calling maestro hierarchy. Other components have id's assigned too and Maestro isn't picking it up. Have tried using accessibilityLabel, nativeID and data-testid but none work.

To reproduce, run maestro hierarchy on a starter project with the code below and check that it only prints the text and button id's on the hierarchy.

import {StatusBar, View, Text, Button, Image} from 'react-native';
import Svg, {Path} from 'react-native-svg';

const App = () => (
  <View
    testID="view-id"
    data-testid="view-id"
    nativeID="view-id"
    accessibilityLabel="view-id">
    <Text testID="text-id">hello world</Text>
    <Button title="button" testID="button-id"/>
    <Image
      source={{
        uri: 'https://res.cloudinary.com/demo/image/upload/v1312461204/sample.jpg',
      }}
      testID="image-id"
      data-testid="image-id"
      nativeID="image-id"
      accessibilityLabel="image-id"
    />
    <Svg
      width="24"
      height="24"
      viewBox="0 0 24 24"
      fill="none"
      testID="svg-id"
      data-testid="svg-id"
      nativeID="svg-id"
      accessibilityLabel="svg-id">
      <Path
        d="M9.92902 11.9997L13.75 8.17866C14.164 7.76466 14.164 7.09266 13.75 6.67866C13.336 6.26466 12.664 6.26466 12.25 6.67866L7.63602 11.2927C7.24502 11.6837 7.24502 12.3167 7.63602 12.7067L12.25 17.3207C12.664 17.7347 13.336 17.7347 13.75 17.3207C14.164 16.9067 14.164 16.2347 13.75 15.8207L9.92902 11.9997Z"
        fill="black"
      />
    </Svg>
  </View>
);

export default App

antoniofranciscoandrade avatar Oct 25 '22 22:10 antoniofranciscoandrade

I'm having the same issue on ios only

maudjossier avatar Oct 27 '22 13:10 maudjossier

Thanks for taking the time to raise this issue! There has been a lot of improvements and fixes on Maestro with regards to React Native (docs here) since this was raised so we’ll go ahead and close this one out as part of an issue cleanup - if you still experience issues, please open a new issue with reproduction steps. Thanks again for using maestro!

axelniklasson avatar May 03 '23 13:05 axelniklasson

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. Thank you for helping keep us our issue tracker clean!

github-actions[bot] avatar Jul 11 '24 12:07 github-actions[bot]