Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TabBarTestId is always a not found element #935

Closed
hajermay opened this issue Sep 13, 2018 · 6 comments
Closed

TabBarTestId is always a not found element #935

hajermay opened this issue Sep 13, 2018 · 6 comments

Comments

@hajermay
Copy link

const MoreStack = createStackNavigator({
MoreScreen: {
screen: MoreScreen,
navigationOptions: {
headerTitle: ,
headerStyle: styles.headerCentered,
},
},

MoreStack.navigationOptions = {
tabBarIcon: ({ tintColor }) => (),
TabBarTestId: 'Child',
};

const PrimaryNav = createBottomTabNavigator({
HomeStack,
NotificationsStack,
InboxStack,
MoreStack,
},

it('should open second menu on tabbar', async () => {
await element(by.id('Child')).tap();
});

@juand89
Copy link

juand89 commented Sep 14, 2018

what error do you have? I had the same problem but solved using element(by.id('TabBarID')).atIndex(0)

@hajermay
Copy link
Author

@juand89 what is the version of react-navigation you have used at that case

@juand89
Copy link

juand89 commented Sep 14, 2018

@hajermay version 2.6.2

@hajermay
Copy link
Author

@juand89 im using a little bit old project with version 2.0.0 of react navigation i can guess the problem it comes from that reason.

@juand89
Copy link

juand89 commented Sep 14, 2018

@hajermay yes you are right! I changed the version of react navigation to 2.0.0 and the test fails showing Cannot find UI element.

@hajermay
Copy link
Author

hajermay commented Sep 14, 2018 via email

@lock lock bot locked as resolved and limited conversation to collaborators Sep 17, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants