Issue
I am currently learning Espresso, I'm writing a test case where user does the following.
Pre-condition:- Create a rule to activate a login activity:
- Opens the app
- Types username password
- Clicks on login button
Now user gets redirected to a new activity where it displays the username. How do I assert the text in Logged in activity?
Basically how to navigate between multiple activities in a single testcase
Solution
I was able to resolve this issue by pointing the @Rule notation to the MainActivity class. Previously I had pointed this to a different activity class where it does authentication logic.
Answered By - Pubudu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.