标题: [Android Robotium]挂断电话用什么函数? [打印本页] 作者: lavender_bj1 时间: 2011-8-1 15:02 标题: [Android Robotium]挂断电话用什么函数? 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!作者: xiang0522 时间: 2011-8-2 11:10
不懂,帮顶。作者: yacey 时间: 2011-8-11 16:46
我也是初学阶段,帮不到什么忙,给顶一下