I'm trying to test that a text field in an android app only accepts numbers and no letters or special characters. However, when I run the piece of code below on my OnePlusX the special characters get inputted as numbers! But when I run it on a Nexus 5, it behaves as expected with no values inputted.
This is nuts!
Any ideas why?
@Test
public void noLoginSession_inputSpecialCharsIntoTelephone_specialCharsIgnored() {
clearFields();
onView(withId(R.id.login_cell_number)).perform(typeText("!@#$%^&*()-_=+")).check(matches(withText("")));
}
Aucun commentaire:
Enregistrer un commentaire