By using Appium & Jest I am writing tests with React Native for iOS & Android here how it goes…
<Text accessibilityLabel={‘nameError’}>Invalid name
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 extracting text?)