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

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);  
   
 } 

你可能感兴趣的:(自动化测试)