I'm trying to write an acceptance test that logs the user out by opening the side menu and clicking on the Logout button. Chimp is complaining, Uncaught Error: element not visible
. Here's my test:
it('user can log out @watch', function() {
//navigates to login form, fills in the form and submits, verifies that we see the hamburger (sidemenu) button.
loginUser(ROLE_TYPE_ADMIN);
//click the hamburger menu to slide open (reveal) the side menu
browser.click("button.ion-navicon");
//wait for animation to finish
browser.pause(500);
//wait for my login button to be recognized
browser.waitForVisible('.mes-chimp-logout');
//click the logout button (never gets this far – Uncaught Error: element not visible)
browser.click('.mes-chimp-logout');
});
It's strange to me that if I take out the browser.click
line that it succeeds because that would imply that it IS visible, yet the following line complains that it isn't visible.
Some other insights:
- If I take the side menu button and stick it in the foreground content, outside of the side menu, I can get it to be clickable
- the foreground content outside of the side menu is an
ion-pane
. It slides to reveal the side menu using a translate3d style
How can I overcome this error and click on the logout (or any side menu) button?