|
Android2.2,2.3。
public void test_callout() throws Exception {
solo.clickOnText("Phone");
solo.enterText(0, "10086");
solo.sendKey(9);//Call
solo.sleep(10000);//wait 10s
solo.xxx
}
solo.xxx尝试了以下都不行。怎么办?
solo.clickOnText("End"); //The text: End is not found!
solo.clickOnButton("End");//The text: End is not found!
solo.clickOnImageButton(1);//There is no ImageButton with index 1
solo.clickOnImage(1);//There is no ImageView with index 1
solo.clickOnScreen(100,100);//Click can not be completed! Something is in the way e.g. the keyboard.
solo.clickOnMenuItem("End call");//Can not complete action!
solo.sendKey(10);//EndCall//Can not complete action!
solo.goBack();//没反应
solo.goBackToActivity("DialtactsActivity");//没反应
System.out.println("Current view is "+solo.getViews().get(0).toString());//java.lang.NullPointerException
solo.clickOnView(solo.getViews().get(0));//View is null and can therefore not be clicked!
System.out.println("Current text is "+solo.getText(0).toString());//No TextView with index 0 is found! |
|