Appium Inspector is unable to locate the child elements in iOS Element Hierarchy

后端 未结 1 1112
长发绾君心
长发绾君心 2021-01-26 06:07

Apps built on : React Native 0.62.2

Tool used for Testing : Appium v1.17.1

Issue Description : The Child Element

1条回答
  •  情话喂你
    2021-01-26 07:01

    create a class with following content:

    import { Platform } from 'react-native';
    
    export function accessibility(id?: string) {
      return Platform.OS === 'android'
        ? { accessible: true, accessibilityLabel: id }
        : { accessible: false, testID: id };
    }
    

    and import 'accessibility' function where you want to use then use it as props

    0 讨论(0)
提交回复
热议问题