How to open navigation drawer menu in Robotium automation script in android

0
0

I have a application with navigation drawer i want to open the drawer menu in Robotium automation script.my application minimum Api level is 11 so i am using action bar sherlock for action bar implementation. Please guide me in right way

  • You must to post comments
0
0

none of the methods mentioned in documentation seem to work.
Best option is to swipe rightwards

private void swipeToRight() {
Display display = solo.getCurrentActivity().getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
float xStart = 0 ;
float xEnd = width / 2;
solo
.drag(xStart, xEnd, height / 2, height / 2, 1);
}

This will do this trick.

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website