How to click on a button, which is indexed at 10 position in ListView - Robotium automation?
- 阅读更多 关于 How to click on a button, which is indexed at 10 position in ListView - Robotium automation?
问题 Suppose, I have a ListView, which contains 20 ListItems. Each item is having a button, now I want to click a button which is located at 10 position in ListView. How I can automate it via robotium? 回答1: Try to do ti like this (not sure if it works) //get the list view ListView myList = (ListView)solo.getView(R.id.list); //get the list element at the position you want View listElement = myList.getChildAt(10);// myList is local var //click on imageView inside that list element solo.clickOnView