私はテキストフィールドに特殊文字を入れてはならないことを確認するテストケースを持っています。たとえば、送信ボタンをクリックするとエラーメッセージが表示されます。テキストフィールドに特殊文字を入れてはいけません。私はエスプレッソで自動化する必要があります。テストユーザーがテキストフィールドに特殊文字を使用してはならないことを確認するケース
私が利用可能かどうかの特殊文字をチェックするために、このメソッドを使用し
@LargeTest
@RunWith(AndroidJUnit4.class)
public class T2W_0014 {
@Rule
public ActivityTestRule<SplashScreenActivity> mActivityTestRule = new ActivityTestRule<>(SplashScreenActivity.class);
@Test
public void t2W_0014() {
ViewInteraction customButton2 = onView(
allOf(withId(R.id.btn_signup), withText("Sign up"), isDisplayed()));
customButton2.perform(click());
ViewInteraction customEditText = onView(
allOf(withId(R.id.first_name), isDisplayed()));
customEditText.perform(click());
ViewInteraction customEditText2 = onView(
allOf(withId(R.id.first_name), isDisplayed()));
customEditText2.perform(replaceText("abhisek1"), closeSoftKeyboard());
ViewInteraction customEditText3 = onView(
allOf(withId(R.id.last_name), isDisplayed()));
customEditText3.perform(replaceText("numeric2"), closeSoftKeyboard());
ViewInteraction customButton3 = onView(
allOf(withId(R.id.btn_signup), withText("Sign up"), isDisplayed()));
customButton3.perform(click());
}
}
質問を編集して、誤って回答として投稿した情報を含めると、私はあなたの質問に答えます。あなたが編集した後で私にpingをしても構いません。 –