Hello Friends 👋,
Welcome To Infinitbility! ❤️
React Native detox tutorial
2. React native detox multiple typeText crash issues
3. React native detox with react navigation example
4. react-native-date-picker detox example
5. react-native-otp-input detox example
React native detox typeText works properly no matter how many times you are using it.
Some developers write complex component render code like forwarding ref, dynamic rendering components, etc.
In this case, you have to use the detox replaceText()
method.
Talk is cheap, show me code.
React native detox replaceText()
method will smoothly handle all types of situations.
I will recommend to use
replaceText()
method instead oftypeText()
method.
describe('Example', () => {
beforeAll(async () => {
await device.launchApp();
});
it('should have login screen', async () => {
await expect(element(by.id('loginView'))).toBeVisible();
});
it('should fill login form', async () => {
await element(by.id('emailInput')).replaceText('infinitbility@gmail.com');
await element(by.id('passwordInput')).replaceText('1234');
await element(by.id('confirmPasswordInput')).replaceText('tdxrd');
await element(by.id('loginButton')).tap();
});
});
Output
Thanks for reading…