Appium iOS + React Native elementByAccesibilityId.text()

arogyalokesh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 1, 2018

By using Appium & Jest I am writing tests with React Native for iOS & Android here how it goes..

<Text accessibilityLabel={'nameError'}>Invalid name</Text>

To extract the value of React Native Txt Element i have used the following chain.

driver.elementByAccessibilityId('nameError')
      .then(error => error.text())
      .then(errorText => expect(errorText).toBe('Invalid name'))

With android test is +ve but in iOS it fails & erroeText==='nameError'.

Can anyone help me with this??(cross-platform used for ectracting text?)

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events