[Katalon Studio] Can not swipe on device

Email info: vinhlt04@acb.com.vn, tuntc09@acb.com.vn
Hi Team,
I use swipe() function to scroll on device mobile but it is not work. I got error message “Can not swipe on device” both Android and IOS.

Mobile.swipe(300, 800, 300, 100)

Android OS 14
IOS 16.0.2
Operating System: MacOS Sonoma 14.1.2
Katalon Studio version 9.3.1

Appium version 2.5.1
:heavy_check_mark: Listing available drivers

  • uiautomator2@3.0.0 [installed (npm)]
  • espresso@2.36.1 [installed (npm)]
  • xcuitest@7.1.0 [installed (npm)]
  • flutter@2.4.2 [installed (npm)]

Here is log details:

=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.UnsupportedCommandException: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
 
For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================
 
03-01-2024 01:31:47 PM swipe(300, 100, 300, 500)
 
Elapsed time: 0.809s
 
Cannot swipe on device. (Root cause: com.kms.katalon.core.exception.StepFailedException: Cannot swipe on device.
    at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:38)
    at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
    at com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword.swipe(SwipeKeyword.groovy:71)
    at com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword.execute(SwipeKeyword.groovy:66)
    at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
    at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.swipe(MobileBuiltInKeywords.groovy:192)
    at 97. Android_Tiet Kiem Online Co Ki Han Online - Ky Han Thang.run(97. Android_Tiet Kiem Online Co Ki Han Online - Ky Han Thang:85)
    at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
    at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
    at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
    at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
    at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
    at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
    at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
    at com.kms.katalon.core.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)
    at com.kms.katalon.core.main.TestCaseBindingExecutor.accessTestCaseBindingMainPhase(TestCaseBindingExecutor.java:67)
    at com.kms.katalon.core.main.TestCaseBindingExecutor.execute(TestCaseBindingExecutor.java:44)
    at com.kms.katalon.core.main.TestCaseMain.startTestCaseBinding(TestCaseMain.java:185)
    at TempTestCaseBinding1709274562713.run(TempTestCaseBinding1709274562713.groovy:25)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: org.openqa.selenium.UnsupportedCommandException: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'MacBook-Pro-cua-Thanh.local', ip: 'fe80:0:0:0:1013:14bb:78:95bb%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '14.2', java.version: '17.0.7'
Driver info: com.kms.katalon.core.appium.driver.SwipeableAndroidDriver
Capabilities {appActivity: .Settings, appPackage: com.android.settings, autoGrantPermissions: true, automationName: uiautomator2, databaseEnabled: false, desired: {appActivity: .Settings, appPackage: com.android.settings, autoGrantPermissions: true, automationName: uiautomator2, deviceId: , deviceName: samsung SM-G990E (Android 14), fullReset: false, newCommandTimeout: 1800, noReset: true, platformName: android, platformVersion: 14, systemPort: 8255, udid: R5CT81EV9DY}, deviceApiLevel: 34, deviceId: , deviceManufacturer: samsung, deviceModel: SM-G990E, deviceName: R5CT81EV9DY, deviceScreenDensity: 480, deviceScreenSize: 1080x2340, deviceUDID: R5CT81EV9DY, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 1800, noReset: true, pixelRatio: 3, platform: LINUX, platformName: Android, platformVersion: 14, statBarHeight: 97, systemPort: 8255, takesScreenshot: true, udid: R5CT81EV9DY, viewportRect: {height: 2243, left: 0, top: 97, width: 1080}, warnings: {}, webStorageEnabled: false}
Session ID: de624255-eb7f-4add-acc0-232aa70f789b
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
    at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
    at com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.execute(SwipeableAndroidDriver.java:1)
    at io.appium.java_client.PerformsTouchActions.performTouchAction(PerformsTouchActions.java:41)
    at io.appium.java_client.TouchAction.perform(TouchAction.java:187)
    at com.kms.katalon.core.mobile.helper.MobileCommonHelper.swipe(MobileCommonHelper.java:64)
    at com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword$_swipe_closure1.doCall(SwipeKeyword.groovy:76)
    at com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword$_swipe_closure1.call(SwipeKeyword.groovy)
    at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:19)
    at com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword.swipe(SwipeKeyword.groovy:71)
    at com.kms.katalon.core.mobile.keyword.builtin.SwipeKeyword.execute(SwipeKeyword.groovy:66)
    at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
    at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.swipe(MobileBuiltInKeywords.groovy:192)
    at Script1665707234303.run(Script1665707234303.groovy:85)
1 Like

Hi Vinh,

Welcome to our forum. :wave:

I found another topic on our forum which also mentioned the “Cannot swipe on device” error. You can check it out below:


Can I also ask if your team are one of our paid customers? If so, then you could also contact our Product Support team - and receive faster responses - via:

  • [For our paid users] Creating a support ticket here, or
  • [For both our paid & free users] Send an email to: support@katalon.com

We hope this helps, :+1:
Albert

Hi Vinh,

Thanks for bringing your issues to us.

After our deep investigation, we’d like to confirm that currently, Katalon Studio does not support appium-uiautomator2-driver v3 due to other compatible dependencies.

Therefore, if you used to upgrading the driver to v3.x, please follow the below steps to uninstall it completely and re-install v2.x: by following the instruction here: https://katalon-inc.my.site.com/katalonhelpcenter/s/article/Can-not-swipe-when-upgrading-to-Appium-2.

I hope it is helpful for you.
Chris

1 Like