标签:io ar 使用 java sp on 问题 cti log
============问题描述============
View view=solo.getView(R.id.btn_Example);//获取View solo.clickOnView(view);//点击
Activity act=solo.getCurrentActivity();//获取Activity int id=act.getResources().getIdentifier("btn_Example", "id", act.getPackageName());//通过String的id获取int的id View view=act.findViewById(id);//获取View solo.clickOnView(view);//点击
private boolean clickById(String id) throws Exception{ if(id==""){ return false; } try{ Activity act=solo.getCurrentActivity();//获取当前Activity int id=act.getResources().getIdentifier(id, "id", solo.getCurrentActivity().getPackageName());//获取id View view=solo.getView(id);//得到View solo.clickOnView(view);//点击 }catch(Exception ex){ Log.e("Exception", ex.getMessage()); throw ex; } return true; }
============解决方案1============
============解决方案2============
============解决方案3============
标签:io ar 使用 java sp on 问题 cti log
原文地址:http://www.cnblogs.com/qibileiru/p/4030448.html