# Unable to use clickGesture

**URL:** <https://discuss.appium.io/t/unable-to-use-clickgesture/36180>\
**Category:** Support\
**Created:** [April 20, 2022, 12:29pm UTC](https://discuss.appium.io/t/unable-to-use-clickgesture/36180 "2022-04-20T12:29:00Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [April 21, 2022, 10:37am UTC](https://discuss.appium.io/t/unable-to-use-clickgesture/36180/6 "2022-04-21T10:37:33Z")

</div>

it is quite obvious…

```auto
Rectangle rectangle = ((WebElement) el).getRect();
Point point = new Point(rectangle.x + (rectangle.width / 2), rectangle.y + (rectangle.height / 2));
PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
Sequence seq = new Sequence(finger, 1);
seq.addAction(finger.createPointerMove(Duration.ofMillis(0), PointerInput.Origin.viewport(), point.x, point.y));
seq.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
seq.addAction(finger.createPointerMove(Duration.ofMillis(50), PointerInput.Origin.viewport(), point.x, point.y));
seq.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Arrays.asList(seq));

```

---

_[View the full topic](https://discuss.appium.io/t/unable-to-use-clickgesture/36180)._
