Katalon 5.2.0.1 : Swipe problem

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 :slight_smile: ?
Regards,

Hi Giulia,

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

Regards

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)

Hi,
is there answer for this issue?

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

Hi,

I have done a workaround for this issue

Please try this and let me know if it helps

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()

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

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)

"

Hi Boris,

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

AppiumDriver<?> driver= MobileDriverFactory.getDriver()

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

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

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

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

Shweta Sankhe 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

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

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.

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)