0

I am doing detox test for react native android version 0.57. I am getting this error.

Error is:

Error: Error: Error performing 'single click - At Coordinates: 720, 1485 and precision: 16, 16' on view '(with tag value: is "create_team_button" and view has effective visibility=VISIBLE)'

Code is

it('should create team', async () => {
    await waitFor(element(by.id('create_team'))).toBeVisible().withTimeout(2000);
    await element(by.id('create_team')).typeText('mobile offize');
    await waitFor(element(by.id('create_team_button'))).toBeVisible().withTimeout(2000);
    await element(by.id('create_team_button')).tap();
  });

And render function is

render() {
    return (
       <View>
            <Button
                testID={'create_team_button'}
                rounded title={I18n.t("NEXT")}
                buttonStyle={styles.button}
                disabled ={!(this.state.teamName.length >0)}
                onPress={this.onCreateTeamButtonPressedDebounced} />
       </View>

Fenter image description hereull error picture

Krupanand K
  • 165
  • 2
  • 11
  • You should post the full error message just not a snippet of it. That may shed more light onto why the error message is occurring. – Andrew Dec 28 '18 at 13:20
  • Hi I have update my question – Krupanand K Dec 31 '18 at 06:33
  • I would check that each item is running successfully. So instead of having one test with 4 things being tested, have four tests with 1 thing being tested in each to make sure that it is working as expected. That would confirm that it is the last one. The only other things I can think that is causing it is the disabled state on the button. Have you tried running it with the button enabled and not reliant on a state change? Is the button fully visible on the screen, with no parts cut off? – Andrew Dec 31 '18 at 08:35
  • I have change button to visiable and again I am getting this error after click the button and In the emulator screen it is showing "Network Request failed" error ? – Krupanand K Jan 01 '19 at 08:08
  • That sounds like a problem with your network code. Are you making a network request when that button is clicked? Are you running detox on your local machine or a CI environment? – Andrew Jan 01 '19 at 08:53
  • yes I am running detox local.we are making network request if we click button. – Krupanand K Jan 01 '19 at 10:49

0 Answers0