How to swipe in Webview

universal use -> How to swipe in a specific area until target element is show?

where scrolling points use needed element to scroll inside

        // 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