Swipe down or up with Espresso driver in Android


I want to swipe down or swipe up the page using the espresso driver. I used the TouchAction method to scroll down the page but it is not working with espresso driver. I am not getting any errors but it just tapping on somewhere in the screen according to the co-ordinance I provided to the function. (Not opening any options from the screen, I can see that, it just pressing, instead of the scroll)

Kindly help me out.