# Facing issue with tap( Actions class) approach on emulator

**URL:** <https://discuss.appium.io/t/facing-issue-with-tap-actions-class-approach-on-emulator/36292>\
**Category:** Support\
**Created:** [May 5, 2022, 5:05pm UTC](https://discuss.appium.io/t/facing-issue-with-tap-actions-class-approach-on-emulator/36292 "2022-05-05T17:05:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Divita\_Goswami](https://discuss.appium.io/user_avatar/discuss.appium.io/divita_goswami/32/9131_2.png) [@Divita\_Goswami](https://discuss.appium.io/u/Divita_Goswami)\
**Post date:** [May 5, 2022, 5:05pm UTC](https://discuss.appium.io/t/facing-issue-with-tap-actions-class-approach-on-emulator/36292/1 "2022-05-05T17:05:07Z")

</div>

hello

I have a scenario in which i need to tap on an element on mobile screen, and i referred to articles provided online and this forum as well. This is how i am trying to tap on the element by finding the rect, i am trying this in android emulator

Android version:11  
appium:1.22.3  
java:11

```
Rectangle eleRect = getElement(locator).getRect();
	int tapX = (int) (eleRect.x + (eleRect.width / 2));
	int tapY = (int) (eleRect.y + (eleRect.height / 2));
	log.info("location: " + tapX + " " + tapY);
	PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
	Sequence tapPoint = new Sequence(finger, 1);

```

// Move finger into start position  
tapPoint.addAction(finger.createPointerMove(Duration.ofMillis(100), PointerInput.Origin.viewport(), tapX, tapY));  
tapPoint.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));  
tapPoint.addAction((new Pause(finger, Duration.ofMillis(100))));  
tapPoint.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));  
driver.perform(Arrays.asList(tapPoint));

but it fails at line driver,perform(Arrays.asList(tapPoint))

after trying to do perform action tap , looks like it is stuck forever and did not perform tap and after a while fails with timeout error

The appium logs show the below:

POST /wd/hub/session/553eea24-61cd-4b3d-ac3c-5b8b56212f82/actions  
[HTTP] {“actions”:[{“id”:“finger”,“type”:“pointer”,“parameters”:{“pointerType”:“touch”},“actions”:[{“duration”:0,“type”:“pause”},{“duration”:100,“x”:206,“y”:172,“type”:“pointerMove”,“origin”:“viewport”},{“button”:0,“type”:“pointerDown”},{“duration”:100,“type”:“pause”},{“button”:0,“type”:“pointerUp”}]}]}  
[W3C (553eea24)] Driver proxy active, passing request on via HTTP proxy  
[debug] [WD Proxy] Matched ‘/wd/hub/session/553eea24-61cd-4b3d-ac3c-5b8b56212f82/actions’ to command name ‘performActions’  
[debug] [WD Proxy] Proxying [POST /wd/hub/session/553eea24-61cd-4b3d-ac3c-5b8b56212f82/actions] to [POST [http://127.0.0.1:8000/wd/hub/session/421fb1e44a783ebc8b72756fb83549a3/actions](http://127.0.0.1:8000/wd/hub/session/421fb1e44a783ebc8b72756fb83549a3/actions)] with body: {“actions”:[{“id”:“finger”,“type”:“pointer”,“parameters”:{“pointerType”:“touch”},“actions”:[{“duration”:0,“type”:“pause”},{“duration”:100,“x”:206,“y”:172,“type”:“pointerMove”,“origin”:“viewport”},{“button”:0,“type”:“pointerDown”},{“duration”:100,“type”:“pause”},{“button”:0,“type”:“pointerUp”}]}]}  
[HTTP] --\> OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] {}  
[debug] [HTTP] No route found for /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] \<-- OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts 404 3 ms - 262  
[HTTP]  
[HTTP] --\> OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] {}  
[debug] [HTTP] No route found for /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] \<-- OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts 404 4 ms - 262  
[HTTP]  
[HTTP] --\> OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] {}  
[debug] [HTTP] No route found for /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] \<-- OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts 404 4 ms - 262  
[HTTP]  
[HTTP] --\> OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] {}  
[debug] [HTTP] No route found for /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] \<-- OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts 404 9100 ms - 262  
[HTTP]  
[HTTP] --\> OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] {}  
[debug] [HTTP] No route found for /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] \<-- OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts 404 2 ms - 262  
[HTTP]  
[HTTP] --\> OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] {}  
[debug] [HTTP] No route found for /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] \<-- OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts 404 4 ms - 262  
[HTTP]  
[HTTP] --\> OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] {}  
[debug] [HTTP] No route found for /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts  
[HTTP] \<-- OPTIONS /wd/hub/session/40f77c0a-f4ec-4c59-b300-5e04574f8115/timeouts 404 3 ms - 262

For the routing error that occurs even when i start appium

i tried to start server and i still get this error, i tried to remove wd/hub but then it is on client side, then i see different issue Could not start a new session. Possible causes are invalid address of the remote server or browser

i get this “No route” error when i start appium via command line and i have tried all the suggestions for example passing --base-path /wd/hub still no luck, would be grateful if anyone can help here.  
Thanks in advance
