package com.example.test;
import android.test.ActivityInstrumentationTestCase2;
import com.robotium.solo.Solo;
@SuppressWarnings("rawtypes")
public class RobotiumActivity extends ActivityInstrumentationTestCase2 {
private Solo solo;
private static final String LAUNCHER_ACTIVITY_FULL_CLASSNAME = "com.example.test";
private static Class<?> launcherActivityClass;
static{
try {
launcherActivityClass = Class.forName(LAUNCHER_ACTIVITY_FULL_CLASSNAME);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
@SuppressWarnings("unchecked")
public RobotiumActivity() throws ClassNotFoundException {
super(launcherActivityClass);
}
public void setUp() throws Exception {
super.setUp();
solo = new Solo(getInstrumentation());
getActivity();
}
@Override
public void tearDown() throws Exception {
solo.finishOpenedActivities();
super.tearDown();
}
public void testRun() {
//Wait for activity: 'com.example.ExampleActivty'
//Clear the EditText editText1
solo.enterText(2,"");
solo.enterText(4,"");
// solo.clearEditText((android.widget.EditText) solo.getView("editText1"));
// solo.enterText((android.widget.EditText) solo.getView("editText1"), "This is an example text");
}
}
위 클래스를 다른 액비티비에서 실행할고 하는데요
public void testRun
위 함수를 메인액티비티에서 실행하려고합니다.
그래서 public static RobotiumActivity robo = new RobotiumActiviy();
이렇게 선언해서 하려고 헀는데요
java.lang.ClassNotFoundException
이 에러가 뜨는데
메인 함수가 없어서 그런건가요?