# \*\*\*URGENT - Mobile.swipe does not execute (screen stays static) but passes in log \[Updated\]

**URL:** <https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345>\
**Category:** Mobile Testing\
**Tags:** mobile-testing, katalon-studio\
**Created:** [June 4, 2018, 8:08pm UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345 "2018-06-04T20:08:00Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dish\_Anywhere](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@Dish\_Anywhere](https://forum.katalon.com/u/Dish_Anywhere)\
**Post date:** [June 4, 2018, 8:08pm UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/1 "2018-06-04T20:08:00Z")

</div>

Studio - Version 5.4.1

Appium - Version 1.7.2

Java - Version 1.8.0\_131

When executing a test case with mobile.swipe (startx starty endx endy) on a real device, the screen does not scroll to the new position, but the log displays the test step as a pass. I’ve searched this issue with no such luck. I need to have a solution by the end of the day and I need a solution that works on both android and ios real devices.

\*\*\*I am using relative endx & endy positions.

Any suggestion would be appreciated!

---

<div class="post-metadata">

**Author:** ![Dish\_Anywhere](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@Dish\_Anywhere](https://forum.katalon.com/u/Dish_Anywhere)\
**Post date:** [June 4, 2018, 8:39pm UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/2 "2018-06-04T20:39:34Z")

</div>

Console Log:

06-04-2018 02:34:53 PM - [START] - Start action : swipe  
06-04-2018 02:34:54 PM - [PASSED] - Swiped from 100,600 to 0,600  
[HTTP] --\> GET /wd/hub/session/b75d8b98-0cc1-4488-a031-96b782876124/context {}  
[debug] [MJSONWP] Calling AppiumDriver.getCurrentContext() with args: [“b75d8b98-0cc1-4488-a031-96b782876124”]  
[debug] [MJSONWP] Responding to client with driver.getCurrentContext() result: “NATIVE\_APP”  
[HTTP] \<-- GET /wd/hub/session/b75d8b98-0cc1-4488-a031-96b782876124/context 200 3 ms - 84  
[HTTP] --\> GET /wd/hub/session/b75d8b98-0cc1-4488-a031-96b782876124/contexts {}  
[debug] [MJSONWP] Calling AppiumDriver.getContexts() with args: [“b75d8b98-0cc1-4488-a031-96b782876124”]  
[debug] [AndroidDriver] Getting a list of available webviews  
[debug] [ADB] Getting connected devices…  
[debug] [ADB] 1 device(s) connected  
[debug] [ADB] Running ‘/Users/name/.katalon/tools/android\_sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“2b7e47aa29804c53”,“shell”,“cat”,"/proc/net/unix"]  
[debug] [AndroidDriver] Found webviews: []  
[debug] [AndroidDriver] Available contexts: [“NATIVE\_APP”]  
[debug] [MJSONWP] Responding to client with driver.getContexts() result: [“NATIVE\_APP”]  
[HTTP] \<-- GET /wd/hub/session/b75d8b98-0cc1-4488-a031-96b782876124/contexts 200 65 ms - 86  
[HTTP] --\> POST /wd/hub/session/b75d8b98-0cc1-4488-a031-96b782876124/context {“name”:“NATIVE\_APP”}  
[debug] [MJSONWP] Calling AppiumDriver.setContext() with args: [“NATIVE\_APP”,“b75d8b98-0cc1-4488-a031-96b782876124”]  
[debug] [AndroidDriver] Getting a list of available webviews  
[debug] [ADB] Getting connected devices…  
[debug] [ADB] 1 device(s) connected  
[debug] [ADB] Running ‘/Users/name/.katalon/tools/android\_sdk/platform-tools/adb’ with args: ["-P",5037,"-s",“2b7e47aa29804c53”,“shell”,“cat”,"/proc/net/unix"]  
[debug] [AndroidDriver] Found webviews: []  
[debug] [AndroidDriver] Available contexts: [“NATIVE\_APP”]  
[debug] [MJSONWP] Responding to client with driver.setContext() result: null  
[HTTP] \<-- POST /wd/hub/session/b75d8b98-0cc1-4488-a031-96b782876124/context 200 65 ms - 76  
[HTTP] --\> POST /wd/hub/session/b75d8b98-0cc1-4488-a031-96b782876124/touch/perform {“actions”:[{“action”:“press”,“options”:{“x”:100,“y”:600}},{“action”:“wait”,“options”:{“ms”:500}},{“action”:“moveTo”,“options”:{“x”:0,“y”:600}}]}  
[debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{“action”:“press”,“options”:{“x”:100,“y”:600}},{“action”:“wait”,“options”:{“ms”:500}},{“action”:“moveTo”,“options”:{“x”:0,“y”:600}}],“b75d8b98-0cc1-4488-a031-96b782876124”]  
[debug] [JSONWP Proxy] Proxying [POST /touch/down] to [POST [http://localhost:8201/wd/hub/session/cb67c68f-246d-4e26-8435-db56a1b00a75/touch/down](http://localhost:8201/wd/hub/session/cb67c68f-246d-4e26-8435-db56a1b00a75/touch/down)] with body: {“params”:{“x”:100,“y”:600}}  
[debug] [JSONWP Proxy] Got response with status 200: {“sessionId”:“cb67c68f-246d-4e26-8435-db56a1b00a75”,“status”:0,“value”:true}  
[debug] [JSONWP Proxy] Proxying [POST /touch/move] to [POST [http://localhost:8201/wd/hub/session/cb67c68f-246d-4e26-8435-db56a1b00a75/touch/move](http://localhost:8201/wd/hub/session/cb67c68f-246d-4e26-8435-db56a1b00a75/touch/move)] with body: {“params”:{“x”:100,“y”:1200}}  
[debug] [JSONWP Proxy] Got response with status 200: {“sessionId”:“cb67c68f-246d-4e26-8435-db56a1b00a75”,“status”:0,“value”:true}  
[debug] [MJSONWP] Responding to client with driver.performTouch() result: null  
[HTTP] \<-- POST /wd/hub/session/b75d8b98-0cc1-4488-a031-96b782876124/touch/perform 200 601 ms - 76  
[HTTP] --\> POST /wd/hub/session/b75d8b98-0cc1-4488-a031-96b782876124/context {“name”:“NATIVE\_APP”}  
[debug] [MJSONWP] Calling AppiumDriver.setContext() with args: [“NATIVE\_APP”,“b75d8b98-0cc1-4488-a031-96b782876124”]  
[debug] [AndroidDriver] Getting a list of available webviews  
[debug] [ADB] Getting connected devices…  
06-04-2018 02:34:54 PM - [END] - End action : swipe

---

<div class="post-metadata">

**Author:** ![Dish\_Anywhere](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@Dish\_Anywhere](https://forum.katalon.com/u/Dish_Anywhere)\
**Post date:** [June 4, 2018, 10:24pm UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/3 "2018-06-04T22:24:52Z")

</div>

Can anyone help me? Katalon’s out-of-the-box swipe built-in keyword is not working. Need a solution for both android and ios real devices.

---

<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:** [June 5, 2018, 3:22am UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/4 "2018-06-05T03:22:25Z")

</div>

You can try this solution: [https://medium.com/@manishboricha308/ios-mobile-swipe-action-in-katalon-studio-4911199679e](https://medium.com/@manishboricha308/ios-mobile-swipe-action-in-katalon-studio-4911199679e)

By the way, endX and endY are relative positions, not absolute positions, so please help to double check your used coordinates again.

---

<div class="post-metadata">

**Author:** ![Dish\_Anywhere](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@Dish\_Anywhere](https://forum.katalon.com/u/Dish_Anywhere)\
**Post date:** [June 5, 2018, 2:39pm UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/5 "2018-06-05T14:39:34Z")

</div>

Thanks for you answer Vinh, but I have already tried this solution for android and it’s not working.

Maybe I’m missing all the class packages. Could you provide those for me?

I have:

package jsScripts

import org.openqa.selenium.JavascriptExecutor  
import com.kms.katalon.core.annotation.Keyword  
import io.appium.java\_client.AppiumDriver  
import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory  
import org.openqa.selenium.WebDriver as driver  
import io.appium.java\_client.TouchAction

public class jsMobileSwipe {

@Keyword  
def swipeDirection(String direction){  
JavascriptExecutor js = (JavascriptExecutor) getCurrentSessionMobileDriver()  
HashMap\<String, String\> scrollObject = new HashMap\<String, String\>()  
scrollObject.put(“direction”, direction)  
js.executeScript(“mobile: swipe”, scrollObject)  
}

@Keyword  
def AppiumDriver getCurrentSessionMobileDriver() {  
return MobileDriverFactory.getDriver()

}

}

---

<div class="post-metadata">

**Author:** ![Dish\_Anywhere](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@Dish\_Anywhere](https://forum.katalon.com/u/Dish_Anywhere)\
**Post date:** [June 5, 2018, 3:46pm UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/6 "2018-06-05T15:46:45Z")

</div>

I’m receiving this error with the code above:

06-05-2018 09:44:30 AM - [START] - Start action : jsScripts.jsMobileSwipe.swipeDirection  
06-05-2018 09:44:30 AM - [ERROR] - Unknown mobile command “swipe”. Only shell,scrollBackTo,viewportScreenshot,deepLink,startLogsBroadcast,stopLogsBroadcast,acceptAlert,dismissAlert,batteryInfo commands are supported. (WARNING: The server did not provide any stacktrace information)  
Command duration or timeout: 0 milliseconds  
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’  
System info: host: ‘INSLE0056428MAC.local’, ip: ‘fe80:0:0:0:149e:527a:863b:1ce6%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86\_64’, os.version: ‘10.13.4’, java.version: ‘1.8.0\_102’  
Driver info: com.kms.katalon.core.appium.driver.SwipeableAndroidDriver  
Capabilities {app: /Users/name/Downlo…, appPackage: com.dishnetwork.danyone, autoGrantPermissions: true, automationName: uiautomator2, databaseEnabled: false, desired: {app: /Users/nameDownlo…, autoGrantPermissions: true, automationName: uiautomator2, deviceId: , deviceName: samsung SM-T820 (Android 7.0), fullReset: true, newCommandTimeout: 1800, noReset: false, platform: ANDROID, platformName: Android, udid: 2b7e47aa29804c53}, deviceApiLevel: 24, deviceId: , deviceManufacturer: samsung, deviceModel: SM-T820, deviceName: 2b7e47aa29804c53, deviceScreenDensity: 320, deviceScreenSize: 1536x2048, deviceUDID: 2b7e47aa29804c53, fullReset: true, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 1800, noReset: false, pixelRatio: 2, platform: ANDROID, platformName: ANDROID, platformVersion: 7.0, statBarHeight: 48, takesScreenshot: true, udid: 2b7e47aa29804c53, viewportRect: {height: 2000, left: 0, top: 48, width: 1536}, warnings: {}, webStorageEnabled: false}  
Session ID: 705db454-d685-4c61-88a8-cb74293b340f  
06-05-2018 09:44:30 AM - [END] - End action : jsScripts.jsMobileSwipe.swipeDirection

---

<div class="post-metadata">

**Author:** ![Dino](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.katalon.com/u/Dino)\
**Post date:** [July 5, 2018, 8:13am UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/7 "2018-07-05T08:13:34Z")

</div>

> [Dish Anywhere](https://forum.katalon.com/profile/6789/Dish%20Anywhere) said:
> 
> I’m receiving this error with the code above:
> 
> 06-05-2018 09:44:30 AM - [START] - Start action : jsScripts.jsMobileSwipe.swipeDirection  
> 06-05-2018 09:44:30 AM - [ERROR] - Unknown mobile command “swipe”. Only shell,scrollBackTo,viewportScreenshot,deepLink,startLogsBroadcast,stopLogsBroadcast,acceptAlert,dismissAlert,batteryInfo commands are supported. (WARNING: The server did not provide any stacktrace information)  
> Command duration or timeout: 0 milliseconds  
> Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’  
> System info: host: ‘INSLE0056428MAC.local’, ip: ‘fe80:0:0:0:149e:527a:863b:1ce6%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86\_64’, os.version: ‘10.13.4’, java.version: ‘1.8.0\_102’  
> Driver info: com.kms.katalon.core.appium.driver.SwipeableAndroidDriver  
> Capabilities {app: /Users/name/Downlo…, appPackage: com.dishnetwork.danyone, autoGrantPermissions: true, automationName: uiautomator2, databaseEnabled: false, desired: {app: /Users/nameDownlo…, autoGrantPermissions: true, automationName: uiautomator2, deviceId: , deviceName: samsung SM-T820 (Android 7.0), fullReset: true, newCommandTimeout: 1800, noReset: false, platform: ANDROID, platformName: Android, udid: 2b7e47aa29804c53}, deviceApiLevel: 24, deviceId: , deviceManufacturer: samsung, deviceModel: SM-T820, deviceName: 2b7e47aa29804c53, deviceScreenDensity: 320, deviceScreenSize: 1536x2048, deviceUDID: 2b7e47aa29804c53, fullReset: true, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 1800, noReset: false, pixelRatio: 2, platform: ANDROID, platformName: ANDROID, platformVersion: 7.0, statBarHeight: 48, takesScreenshot: true, udid: 2b7e47aa29804c53, viewportRect: {height: 2000, left: 0, top: 48, width: 1536}, warnings: {}, webStorageEnabled: false}  
> Session ID: 705db454-d685-4c61-88a8-cb74293b340f  
> 06-05-2018 09:44:30 AM - [END] - End action : jsScripts.jsMobileSwipe.swipeDirection

hI,

same problem…

Do you have solution ?

Thanks @Vinh Nguyen

---

<div class="post-metadata">

**Author:** ![Shweta\_sao](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Shweta\_sao](https://forum.katalon.com/u/Shweta_sao)\
**Post date:** [July 25, 2018, 11:00am UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/8 "2018-07-25T11:00:05Z")

</div>

Hi there

Same problem…

it doesn’t work… any solution please… not able to find any work around as well… please help…

---

<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 21, 2018, 11:03am UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/9 "2018-08-21T11:03:02Z")

</div>

> [Shweta sao](https://forum.katalon.com/profile/8579/Shweta%20sao) said:
> 
> Hi there
> 
> Same problem…
> 
> it doesn’t work… any solution please… not able to find any work around as well… please help…

I am also facing same issue running swipe on mobile. Any solution?

---

<div class="post-metadata">

**Author:** ![Ann\_Tuliantseva](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@Ann\_Tuliantseva](https://forum.katalon.com/u/Ann_Tuliantseva)\
**Post date:** [September 4, 2018, 8:22am UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/10 "2018-09-04T08:22:25Z")

</div>

Hi there!

This solution helped me to solve issue with vertical scroll. Maybe, it will be helpful for somebody

```auto
import io.appium.java_client.TouchAction
import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory as MobileDriverFactory
import io.appium.java_client.AppiumDriver as AppiumDriver
AppiumDriver<?> driver = MobileDriverFactory.getDriver()
while (	Mobile.waitForElementPresent(categoryText, 2, FailureHandling.STOP_ON_FAILURE) == false){
//Mobile.swipe(300, 1430, 300, 1200)	//does not work in Katalon studio (it taps on the position but does not scroll)
TouchAction ta = new TouchAction(driver);
ta.press(startX, startY).waitAction().moveTo(endX, endY).release().perform();
}

```

---

<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:** [January 2, 2019, 10:11am UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/11 "2019-01-02T10:11:41Z")

</div>

Thanks for the solution,but its not working… it shows swipe test step as passed but in actual its not doing(Swipe) anything…

---

<div class="post-metadata">

**Author:** ![elena1.wang](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@elena1.wang](https://forum.katalon.com/u/elena1.wang)\
**Post date:** [January 4, 2019, 8:18am UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/12 "2019-01-04T08:18:40Z")

</div>

Do you have some solution? I also have the same issue…

---

<div class="post-metadata">

**Author:** ![elena1.wang](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@elena1.wang](https://forum.katalon.com/u/elena1.wang)\
**Post date:** [January 4, 2019, 9:14am UTC](https://forum.katalon.com/t/urgent-mobile-swipe-does-not-execute-screen-stays-static-but-passes-in-log-updated/11345/13 "2019-01-04T09:14:30Z")

</div>

according to your method, I succeeded to vertical scrol, thank you for much!
