# Long press is getting deprecated after selenium v4

**URL:** <https://forum.robotframework.org/t/long-press-is-getting-deprecated-after-selenium-v4/5573>\
**Category:** Appium\
**Created:** [14 April 2023 13:03 UTC](https://forum.robotframework.org/t/long-press-is-getting-deprecated-after-selenium-v4/5573 "2023-04-14T13:03:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaid0080](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/zaid0080/32/1697_2.png) [@zaid0080](https://forum.robotframework.org/u/zaid0080)\
**Post date:** [14 April 2023 13:03 UTC](https://forum.robotframework.org/t/long-press-is-getting-deprecated-after-selenium-v4/5573/1 "2023-04-14T13:03:18Z")

</div>

Hey guys,

Many keywords are getting deprecated after selenium v4. I could see alternatives to most of those keywords but I am unable to find any alternative for long press. Would anyone like to help me resolve this issue? Thanks in advance.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/2/2646300cbfb06d4c4d90cac337560a0cc7e8c784.png)  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/2/2646300cbfb06d4c4d90cac337560a0cc7e8c784.png)

---

<div class="post-metadata">

**Author:** ![zastress](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/zastress/32/1259_2.png) [@zastress](https://forum.robotframework.org/u/zastress)\
**Post date:** [14 April 2023 13:49 UTC](https://forum.robotframework.org/t/long-press-is-getting-deprecated-after-selenium-v4/5573/2 "2023-04-14T13:49:02Z")

</div>

You can try this one and modify the time parameter: [https://serhatbolsu.github.io/robotframework-appiumlibrary/AppiumLibrary.html#Tap%20With%20Positions](https://serhatbolsu.github.io/robotframework-appiumlibrary/AppiumLibrary.html#Tap%20With%20Positions)

---

<div class="post-metadata">

**Author:** ![zaid0080](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/zaid0080/32/1697_2.png) [@zaid0080](https://forum.robotframework.org/u/zaid0080)\
**Post date:** [14 April 2023 14:28 UTC](https://forum.robotframework.org/t/long-press-is-getting-deprecated-after-selenium-v4/5573/3 "2023-04-14T14:28:37Z")

</div>

> [@zastress](#):
>
> You can try this one and modify the time par

Thanks for let me know, I was also planning to use but in which I would needing the coordinates of my element then only I will be able to press on it. Was looking for any easy alternative, If nothing works then I guess I would use this one.

Thanks

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [14 April 2023 22:53 UTC](https://forum.robotframework.org/t/long-press-is-getting-deprecated-after-selenium-v4/5573/4 "2023-04-14T22:53:39Z")

</div>

Hi Zaid,

You could do something like this:

```python
Zaids Long Press
    [Arguments] ${Locator} ${duration}=1000
    ${location}= Get Element Location ${Locator}
    @{loclist}= Create List ${location}
    Tap With Positions ${duration} @{loclist}

```

Put it in a common resource file and replace all `Long Press` with `Zaids Long Press`

---

<div class="post-metadata">

**Author:** ![jay6011](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jay6011](https://forum.robotframework.org/u/jay6011)\
**Post date:** [19 June 2023 13:45 UTC](https://forum.robotframework.org/t/long-press-is-getting-deprecated-after-selenium-v4/5573/5 "2023-06-19T13:45:10Z")

</div>

Hi guys, my Tap With Positions is not working follow above example. Can help me resolve this issue?

${Locator}= Set Variable ${SignatureLocator}  
${Duration}= Set Variable 1000  
${location}= Get Element Location ${SignatureLocator}  
@{loclist} = Create List ${location}  
log to console @{loclist}  
Tap With Positions ${Duration} @{loclist}

log to console @{loclist} i got result:

{‘x’: 86, ‘y’: 751}
