How to swipe up in the opened popover window of any application

Hello everybody,
I am automating an application and after launching this application a popover comes on screen showing some information related to this application.And to close this popover user has to reach to the end of this popover by swiping up, as there is a close button at the end of this popover.

I tried it by using driver.swipe(startx, starty, endx, endy, int duration).
But i am unable to swipe it up.

I tried it using following values:-
driver.swipe(100, 200, 100, 600, 500);
driver.swipe(0, 200, 0, 600, 500);
driver.swipe(100, 600, 100, 200, 500);
driver.swipe(0, 600, 0, 200, 500);

Thanks,
Jitender.

Hello Jitenderbhardwaj,

It is not required to scroll to Close button to click. Appium bydefault does that for you if you provide right locator for close button.You can simply get the element and fire a click event on it. Just give a try and check.

Yeah it worked.
Thanks a lot @somasekhar .
I tried to inspect that button but forgot to apply the click event on that button.
When i applied the click event, it worked.
And i inspected the element by using driver.ScrollTo(“String”);

Thanks,
Jitender.