Issue
I'm testing an application with Robotium, and I have a custom listview with checkboxes. When I click on a checkbox it loads a contextual menu giving the user buttons to modify and delete those items.
I can get Robotium to click the checkbox which loads the menu, but for some reason I can't get it to click on the delete button.
I've tried:
solo.clickOnActionBarItem(R.id.menu_delete);
solo.clickOnMenuItem("Delete");
solo.clickOnImageButton(1);
solo.clickOnImage(1);
So far nothing has worked. Is it possibly because I am clicking the button before the menu has popped up? How can I get Robotium to wait?
Solution
It's actually very easy, just click on the view by id:
solo.clickOnView(getActivity().findViewById(R.id.menu_edit));
Answered By - Carrie Hall
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.