Javascript 摩卡罐';在输入字段中找不到ID-react native

Javascript 摩卡罐';在输入字段中找不到ID-react native,javascript,react-native,selenium-webdriver,automated-tests,mocha.js,Javascript,React Native,Selenium Webdriver,Automated Tests,Mocha.js,我试图通过.text()获取输入的文本;从硒中提取方法。但每次我尝试获取元素时,它都会输出找不到相关ID的结果 (我正在使用nativebase的输入,但我已经尝试使用textinput native组件对其进行测试) 事实证明,摩卡/硒找不到进口的nativebase组件。尝试通过本机组件获取输入,结果很好 这非常有效: <Label style={{ marginLeft: 10 }}>Login</Label> <TextInput // reac

我试图通过.text()获取输入的文本;从硒中提取方法。但每次我尝试获取元素时,它都会输出找不到相关ID的结果

(我正在使用nativebase的输入,但我已经尝试使用textinput native组件对其进行测试)


事实证明,摩卡/硒找不到进口的nativebase组件。尝试通过本机组件获取输入,结果很好

这非常有效:

<Label style={{ marginLeft: 10 }}>Login</Label>
      <TextInput // react-native input component
          autoCapitalize='none'
          testID='input_login'
          editable={true}
          autoCorrect={false}
          keyboardType={(Platform.OS === 'android') ? 'visible-password' : ''}
          onChangeText={(item) => this.setState({ login: item })}
          value={this.state.login} 
       />
登录
this.setState({login:item})}
值={this.state.login}
/>
即使你交叉手指,这也行不通:

<Form>
      <Item
           testID='input_nomePaciente_formPacientes'
           stackedLabel>
           <Label style={styles.label}>Nome</Label>
           <Input // nativebase input component
              value={this.state.paciente.nome.toUpperCase()}
              style={styles.inputForm}
              testID='input_testID'
              autoCorrect={false}
              keyboardType={(Platform.OS === 'android') ? 'visible-password' : ''}
              autoCapitalize='none'
              onChangeText={(text) => this._updateItem('nome', text, 0)} />
      </Item>
</Form>

诺姆
此.\u updateItem('nome',text,0)}/>

显然,selenium webdriver甚至看不到输入。如果我尝试将输入存储到一个变量中,并将其保存到console.warn()中,它只输出值为“false”。但是文本输入是可见的。所以非常非常明显。
<Label style={{ marginLeft: 10 }}>Login</Label>
      <TextInput // react-native input component
          autoCapitalize='none'
          testID='input_login'
          editable={true}
          autoCorrect={false}
          keyboardType={(Platform.OS === 'android') ? 'visible-password' : ''}
          onChangeText={(item) => this.setState({ login: item })}
          value={this.state.login} 
       />
<Form>
      <Item
           testID='input_nomePaciente_formPacientes'
           stackedLabel>
           <Label style={styles.label}>Nome</Label>
           <Input // nativebase input component
              value={this.state.paciente.nome.toUpperCase()}
              style={styles.inputForm}
              testID='input_testID'
              autoCorrect={false}
              keyboardType={(Platform.OS === 'android') ? 'visible-password' : ''}
              autoCapitalize='none'
              onChangeText={(text) => this._updateItem('nome', text, 0)} />
      </Item>
</Form>