运行第一个测试用例时遇到这样的问题。
package com.example.com.sinanew.www;
import android.app.Activity;
import android.graphics.AvoidXfermode;
import android.test.ActivityInstrumentationTestCase2;
import com.robotium.solo.Solo;
public class TestOne extends ActivityInstrumentationTestCase2 {
private static String LAUNCHER_ACTIVITY_FULL_CLASSNAME ="com.sina.news.ui.PowerOnScreen";
private static String packageName = "com.sina.news";
private static Class launcherActivityClass;
static{
try {
launcherActivityClass = Class.forName(LAUNCHER_ACTIVITY_FULL_CLASSNAME);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
public TestOne() {
super(packageName,launcherActivityClass);
}
protected Solo solo;
public Activity activity;
@Override
protected void setUp() throws Exception{
this.activity = this.getActivity();
solo = new Solo(getInstrumentation(), getActivity());
}
@Override
protected void tearDown() throws Exception {
//super.tearDown();
try{
solo.finishOpenedActivities();
} catch (Exception e) {
e.printStackTrace();
}
}
public void testLogin() {
solo.sleep(10000);
//solo.waitForText("Log In",1,10000);
//solo.clickOnText("Log In");
}
}