# Katalon 5.2.0.1 : Swipe problem

**URL:** <https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546>\
**Category:** Mobile Testing\
**Tags:** mobile-testing, katalon-studio\
**Created:** [December 12, 2017, 4:48pm UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546 "2017-12-12T16:48:57Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giuliano\_Infantino](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Giuliano\_Infantino](https://forum.katalon.com/u/Giuliano_Infantino)\
**Post date:** [December 12, 2017, 4:48pm UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/1 "2017-12-12T16:48:57Z")

</div>

Hi guys,

Since the version 5.1 and the support of Appium 1.7 I’m facing two problems :

- **tapAtPosition (x,y) :** coordinates seem to have changed, not working as before.
- **swipe(start x, start y, endx (relative), endy (relative)) :**  
After I’ve made changes to adapt my call to the function, Scroll is not working anymore. Start point and end point are well located but the swipe action is not correctly done.

Was working fine on :  
**Katalon 5.0.1**  
**Appium 1.6.5**  
\*\*Android 7.0

\*\*Can anyone help me 🙂 ?  
Regards,

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [December 20, 2017, 10:11am UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/2 "2017-12-20T10:11:39Z")

</div>

Hi Giulia,

Can you share with me your test script after and before your adjustment?

Regards

---

<div class="post-metadata">

**Author:** ![Manish\_Boricha](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Manish\_Boricha](https://forum.katalon.com/u/Manish_Boricha)\
**Post date:** [April 24, 2018, 12:10pm UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/3 "2018-04-24T12:10:32Z")

</div>

Using Swipe function in latest 5.4.1 release

Getting below error in iOS app

Test Cases/Second FAILED because (of) Cannot swipe on device. (Root cause: org.openqa.selenium.WebDriverException: Support for press(options={“x”:315,“y”:63})-wait(options={“ms”:500})-moveTo(options={“x”:215,“y”:63}) gesture is not implemented. Try to use “mobile: \*” interface to workaround the issue. Only these gestures are supported:

doubleTap: doubletap

tap(options={“count”:2})

tap: tap

tap-release

press-release

longPress: longpress

longpress-release

press-wait-release

drag: press-wait-moveTo-release

longpress-moveTo-release

scroll: press-moveTo-release

(WARNING: The server did not provide any stacktrace information)

---

<div class="post-metadata">

**Author:** ![Tadas\_Pranaitis1](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@Tadas\_Pranaitis1](https://forum.katalon.com/u/Tadas_Pranaitis1)\
**Post date:** [May 4, 2018, 4:35am UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/4 "2018-05-04T04:35:19Z")

</div>

Hi,  
is there answer for this issue?

---

<div class="post-metadata">

**Author:** ![Fhadel\_Fadillah](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@Fhadel\_Fadillah](https://forum.katalon.com/u/Fhadel_Fadillah)\
**Post date:** [May 14, 2018, 11:47am UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/5 "2018-05-14T11:47:29Z")

</div>

Hi Vinh,

in 5.4.1 swipe doesnt do any action can you look into it? in my machine swipe doesnt do anything only show passed in log viewer

Thanks

---

<div class="post-metadata">

**Author:** ![Manish\_Boricha](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Manish\_Boricha](https://forum.katalon.com/u/Manish_Boricha)\
**Post date:** [May 14, 2018, 1:05pm UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/6 "2018-05-14T13:05:48Z")

</div>

Hi,

I have done a workaround for this issue

Please try this and let me know if it helps

> **[iOS Mobile Swipe action in Katalon Studio – Manish Boricha – Medium](https://medium.com/@manishboricha308/ios-mobile-swipe-action-in-katalon-studio-4911199679e)**
>
> I have been using Katalon studio for testing iOS mobile application from last one month and yes swipe is the function where i got stuck.

---

<div class="post-metadata">

**Author:** ![Fhadel\_Fadillah](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@Fhadel\_Fadillah](https://forum.katalon.com/u/Fhadel_Fadillah)\
**Post date:** [May 15, 2018, 7:24am UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/7 "2018-05-15T07:24:43Z")

</div>

Hi Manish,

Thanks your code inspire me instead use your code im using this and for now its worked for me

TouchAction action = new TouchAction(driver)  
action.press(X, Y).moveTo(X, Y).release().perform()

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [May 15, 2018, 8:26am UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/8 "2018-05-15T08:26:30Z")

</div>

This might help : [https://medium.com/@manishboricha308/ios-mobile-swipe-action-in-katalon-studio-4911199679e](https://medium.com/@manishboricha308/ios-mobile-swipe-action-in-katalon-studio-4911199679e)

---

<div class="post-metadata">

**Author:** ![Boris\_Bukhin1](https://avatars.discourse-cdn.com/v4/letter/b/e8c25b/32.png) [@Boris\_Bukhin1](https://forum.katalon.com/u/Boris_Bukhin1)\
**Post date:** [May 15, 2018, 12:30pm UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/9 "2018-05-15T12:30:25Z")

</div>

> Fhadel Fadillah said:
> 
> Hi Manish,
> 
> Thanks your code inspire me instead use your code im using this and for now its worked for me
> 
> TouchAction action = new TouchAction(driver)  
> action.press(X, Y).moveTo(X, Y).release().perform()

1.What libraries should be imported for using your code?  
2.How to configure/declare the driver?

I got following error for Kobiton in real device swipe function works ok .

_" FAILED because (of) Cannot swipe on_ _device_\_. (Root cause: org.openqa.selenium.interactions.InvalidCoordinatesException: The coordinates provided to an interactions operation are invalid. (WARNING: The server did not provide any\_ _stacktrace_ _information)_

_"_

---

<div class="post-metadata">

**Author:** ![Fhadel\_Fadillah](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@Fhadel\_Fadillah](https://forum.katalon.com/u/Fhadel_Fadillah)\
**Post date:** [May 17, 2018, 3:00am UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/10 "2018-05-17T03:00:58Z")

</div>

Hi Boris,

I dont import any libraries and i use this to declare the driver

AppiumDriver\<?\> driver= MobileDriverFactory.getDriver()

---

<div class="post-metadata">

**Author:** ![Shweta\_Sankhe](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@Shweta\_Sankhe](https://forum.katalon.com/u/Shweta_Sankhe)\
**Post date:** [June 1, 2018, 9:17am UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/11 "2018-06-01T09:17:43Z")

</div>

**_Swipe for Android (Appium Version 1.7.1) - Dynamic Horizontal Scroll_**  
\*\*Custom Keyword:  
\*\*-------------------------------------------------------------------------------

@Keyword

**def** getdevicelocator(){

**int** device\_Height, device\_Width

device\_Height = Mobile._getDeviceHeight_()

println device\_Height

device\_Width = Mobile._getDeviceWidth_()

println device\_Width

**int** midheight = device\_Height/2

println midheight

**int** midwidth = device\_Width/2

println midwidth

**int** startX,startY,endX,endY

startX = device\_Width-100

startY = midheight

endX = -startX

endY = 0

Mobile._swipe_(startX,startY,endX,endY)

}

\*\*Test Case:  
\*\*

CustomKeywords._‘functions.scroll.getdevicelocator’_()

-------------------------------------------------------------------------------

_**Swipe for Android (Appium Version 1.7.1) - Static Horizontal Scroll according to device resolution coordinates will change**_

Mobile._swipe_(700, 600, -600, 0)

Refer Link: [https://docs.katalon.com/display/KD/[Mobile]+Swipe](https://docs.katalon.com/display/KD/%5BMobile%5D+Swipe)

-------------------------------------------------------------------------------

In case if your appium version is **below 1.7.1** (Relative Scroll will not work)

Mobile._swipe_(700, 600, 100, 600)

---

<div class="post-metadata">

**Author:** ![Pooja1](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@Pooja1](https://forum.katalon.com/u/Pooja1)\
**Post date:** [August 16, 2018, 1:09pm UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/12 "2018-08-16T13:09:55Z")

</div>

> [Shweta Sankhe](https://forum.katalon.com/profile/7629/Shweta%20Sankhe "Link: /profile/7629/Shweta%20Sankhe") said:
> 
> **_Swipe for Android (Appium Version 1.7.1) - Dynamic Horizontal Scroll_**  
> \*\*Custom Keyword:  
> \*\*-------------------------------------------------------------------------------
> 
> @Keyword
> 
> **def** getdevicelocator(){
> 
> **int** device\_Height, device\_Width
> 
> device\_Height = Mobile._getDeviceHeight_()
> 
> println device\_Height
> 
> device\_Width = Mobile._getDeviceWidth_()
> 
> println device\_Width
> 
> **int** midheight = device\_Height/2
> 
> println midheight
> 
> **int** midwidth = device\_Width/2
> 
> println midwidth
> 
> **int** startX,startY,endX,endY
> 
> startX = device\_Width-100
> 
> startY = midheight
> 
> endX = -startX
> 
> endY = 0
> 
> Mobile._swipe_(startX,startY,endX,endY)
> 
> }
> 
> \*\*Test Case:  
> \*\*
> 
> CustomKeywords._‘functions.scroll.getdevicelocator’_()
> 
> -------------------------------------------------------------------------------
> 
> _**Swipe for Android (Appium Version 1.7.1) - Static Horizontal Scroll according to device resolution coordinates will change**_
> 
> Mobile._swipe_(700, 600, -600, 0)
> 
> Refer Link: [https://docs.katalon.com/display/KD/[Mobile]+Swipe](https://docs.katalon.com/display/KD/%5BMobile%5D+Swipe)
> 
> -------------------------------------------------------------------------------
> 
> In case if your appium version is **below 1.7.1** (Relative Scroll will not work)
> 
> Mobile._swipe_(700, 600, 100, 600)

Hello Swetha,  
I am trying above code to swipe on my android app but its not doing anything and shows test case as pass.  
basically i want swipe from right to left on my mobile screen(go to next page doing swipe) but its not working me even i modified it.Can you please provide me some information on this.I am stuck at this step.

---

<div class="post-metadata">

**Author:** ![Pooja1](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@Pooja1](https://forum.katalon.com/u/Pooja1)\
**Post date:** [August 17, 2018, 9:33am UTC](https://forum.katalon.com/t/katalon-5-2-0-1-swipe-problem/8546/13 "2018-08-17T09:33:04Z")

</div>

> Fhadel Fadillah said:
> 
> Hi Manish,
> 
> Thanks your code inspire me instead use your code im using this and for now its worked for me
> 
> TouchAction action = new TouchAction(driver)  
> action.press(X, Y).moveTo(X, Y).release().perform()

Hello Fhadel,  
I am using above code but its not working for me.Getting error : org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
