Issue
I've never used espresso before. Now i want to auto type some text in editText field fragment. I know only how to do it with Activity.
@LargeTest
public class EspressoTest {
@Rule
public ActivityTestRule<CheckInActivity> mActivityRule =
new ActivityTestRule<>(CheckInActivity.class);
@Test
public void testActivityShouldHaveText() throws InterruptedException {
onView(withId(R.id.editText)).perform(clearText(), typeText("KI"));
}
}
I have MainFragment hosted by MainActivity and editText is placed inside MainFragment layout.
Also is there a way in espresso to click on some text, so it could find the view by text?
Solution
For now i decided to use robotium because yet i don't know how to implement it using espresso Robotium has such methods as waitForFragment and waitForActivity
Answered By - Jenya Kyrmyza
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.