# How to swipe in Webview

**URL:** <https://discuss.appium.io/t/how-to-swipe-in-webview/39566>\
**Category:** Support\
**Created:** [June 29, 2023, 3:02am UTC](https://discuss.appium.io/t/how-to-swipe-in-webview/39566 "2023-06-29T03:02:05Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [June 30, 2023, 12:28pm UTC](https://discuss.appium.io/t/how-to-swipe-in-webview/39566/7 "2023-06-30T12:28:23Z")

</div>

universal use -\> [How to swipe in a specific area until target element is show?](https://discuss.appium.io/t/how-to-swipe-in-a-specific-area-until-target-element-is-show/28154/18)

where scrolling points use needed element to scroll inside

```auto
        // start scroll from center of element
        Rectangle rectangle = el.getRect();
        int startX = rectangle.x + (rectangle.width / 2);
        int startY = rectangle.y + (rectangle.height / 2);
        int endY = 0;
        // now here calculate end points depending on direction needed

```

---

_[View the full topic](https://discuss.appium.io/t/how-to-swipe-in-webview/39566)._
