Dimension size = driver.manage().window().getSize()//Find swipe start and end point from screen’s with and height.//Find startx point…