本文整理汇总了Java中com.jayway.android.robotium.solo.Solo.assertCurrentActivity方法的典型用法代码示例。如果您正苦于以下问题:Java Solo.assertCurrentActivity方法的具体用法?Java Solo.assertCurrentActivity怎么用?Java Solo.assertCurrentActivity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jayway.android.robotium.solo.Solo
的用法示例。
在下文中一共展示了Solo.assertCurrentActivity方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import com.jayway.android.robotium.solo.Solo; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
super.setUp();
solo = new Solo(getInstrumentation(), getActivity());
solo.assertCurrentActivity("Not " + AuthenticationActivity.class.getName(), AuthenticationActivity.class);
EditText editTextUsername = (EditText) solo.getView(R.id.username);
solo.clearEditText(editTextUsername);
solo.enterText(editTextUsername, USER);
((CheckBox) solo.getView(R.id.organization)).setChecked(true);
solo.getView(R.id.octocat).performClick();
solo.sleep(2000);
solo.assertCurrentActivity("Not " + ReposActivity.class.getName(), ReposActivity.class);
}
示例2: setUp
import com.jayway.android.robotium.solo.Solo; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
super.setUp();
solo = new Solo(getInstrumentation(), getActivity());
solo.assertCurrentActivity("Not " + AuthenticationActivity.class.getName(), AuthenticationActivity.class);
EditText editTextUsername = (EditText) solo.getView(R.id.username);
solo.clearEditText(editTextUsername);
solo.enterText(editTextUsername, USER);
solo.getView(R.id.octocat).performClick();
solo.sleep(2000);
}
示例3: testDisplayAndAcceptEula
import com.jayway.android.robotium.solo.Solo; //导入方法依赖的package包/类
public void testDisplayAndAcceptEula() throws Exception {
setAcceptedEula(0);
solo = new Solo(getInstrumentation(), getActivity());
assertTrue(solo.searchText("Nutzungsbedingungen"));
solo.clickOnButton("Ja, ich kenne das Risiko");
assertTrue(solo.searchText("HÖB-Fans"));
solo.assertCurrentActivity("should call app info page",
HoebAppActivity_.class);
assertTrue(solo.getCurrentActivity().hasWindowFocus());
assertEquals(HoebAppActivity.EULA_VERSION, getAcceptedEula());
}