You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use typetext() to verify edittext limit conditions , I found that the order of text is wrong.
my code: Edite text = solo.getEditText(0); solo.setText(text,""); solo.typeText(text,'2.2222'); assertEquals("2.22", text.getText().toString());
but I get actual result is 22.22 not 2.22
how can I avoid this situation?
thank you in advance!
The text was updated successfully, but these errors were encountered:
This happened to me long time ago. setText maybe more reliable because it uses Android API to input text , while typeText use Instrumentation sendStringSync, it emulates soft keyboard to enter text.
Thank you!
But If I use solo.setEditText(text,'2.2222'), the result of text.getText().toString() is empty.
I want to simulate the actions of users,but this problem bother me a lot.
When I use typetext() to verify edittext limit conditions , I found that the order of text is wrong.
my code:
Edite text = solo.getEditText(0); solo.setText(text,""); solo.typeText(text,'2.2222'); assertEquals("2.22", text.getText().toString());
but I get actual result is 22.22 not 2.22
how can I avoid this situation?
thank you in advance!
The text was updated successfully, but these errors were encountered: