user1394894
user1394894

Reputation: 11

Robotium ListView with Buttons, can't click on the buttons in the list

I have a dragablelistview with a title and imagebuttons for each item to delete that item. How do I click on the imageview?

clickInList(int , int) does not work (unless i am doing it wrong?)

Upvotes: 1

Views: 864

Answers (2)

Dan Riza
Dan Riza

Reputation: 477

Try to obtain the view of the list item, something like this :

//get the list view
ListView myList = (ListView)solo.getView(R.id.list);
//get the list element at the position you want
View listElement = myLyst.getChildAt(position);
//click on imageView inside that list element
solo.clickOnView(solo.getView(listEelement.findViewById(R.id.image_button)));

Upvotes: 0

d3unka
d3unka

Reputation: 74

Try clickOnText(String) or clickOnImage(int) clickOnImageButton(int) instead

Upvotes: 1

Related Questions