test Case to check that user should not have special character in the text field
<p>I have a test case that will check that user should not have special character in the text field.For example:-if I enter user1 in the first name and click in submit button it gives me an error message I should not have a special character in the text field what should I do to automate in espresso.</p>

<p>This error message i want to automate</p>

<p><a href="https://i.stack.imgur.com/MJD7E.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MJD7E.jpg" alt="enter image description here"></a></p>

<pre><code>@LargeTest
@RunWith(AndroidJUnit4.class)
public class T2W_0014 {

    @Rule
    public ActivityTestRule&lt;SplashScreenActivity&gt; mActivityTestRule = new ActivityTestRule&lt;&gt;(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());
    }
}
</code></pre>