'Unable to perform second ViewInteraction which depends on first ViewInteraction

I'm trying to validate trickplay window (i.e. current frame) which appears when user perform fast forward on video seek bar using finger (i.e. drag the slider).

The problem here I'm facing is as soon as my first operation completes the trickplay window gets disappear thats why my second operation (i.e. assertion is failing)

onView(withIndex(withId(PLAYBACK_SEEK_BAR), 0)).perform(swipeRight());
onView(withId(TRICKPLAY_WINDOW)).check(matches(isDisplayed()));

Error:

AdvisoryException: View matching 'with id: id/TrickplayWindow' is not visible

Is there a way I can perform these two operation and validation at same time?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source