用Robotium 去实现点击imageview
今天用rototium做自动化遇到imageview无法点击的问题,最终解决如下:
有两种方法:
1.View v = solo.getView(R.id.iv_main_setting);
solo.clickOnView(v);
2. for (View v : solo.getCurrentViews()) {
if (v.getId() == R.id.iv_main_setting)
solo.clickOnView(v);
}