Hi @rini,
I was looking your code, and it seems to be fine. Sometime the swipe execution needs a wait to finish.
Try to use the TouchAction instead of Driver.swipe. Here’s some example:
TouchAction touch = new TouchAction(dr);
touch.press(0,0).moveTo(0, 20).waitAction(Duration.ofMillis(500)).release().perform();
Have you tried to debug the execution? While debugging does it work?