【Android】用solo填写EditText的两种方法

来源:互联网 发布:网址转换软件 编辑:程序博客网 时间:2024/06/07 05:57
public void test() {  
        EditText enter = (EditText)solo.getView(R.id.enterText);          solo.enterText(enter, "this is enter text");          solo.sleep(2000);                    int typeId = solo.getCurrentActivity().getResources().getIdentifier("typeText", "id", "com.tangbc.tedit");          View typeView = solo.getView(typeId);          solo.typeText((EditText)typeView, "this is type text");          solo.sleep(2000);     
 } 

0 0
原创粉丝点击