Swipe has not work in katalon version 6.0.5

Hi @freak.fahmi,

This definitely looks like a bug - I’m getting the same thing. Could you please create a bug in the Bug Reports forum (http://forum.katalon.com/c/katalon-studio/katalon-studio-bug-reports)?

It looks like Katalon 6.x has switched the Mobile.swipe function from taking relative end positions to absolute end positions. So, in your case, setting startY to negative is an invalid coordinate and you get an error. You can try using absolute coordinates instead:

device_Height = Mobile.getDeviceHeight()
device_Width = Mobile.getDeviceWidth()
int startX = device_Width / 2
int endX = startX
int startY = device_Height * 0.9 // starts almost at the bottom of the screen
int endY = device_Height * 0.1 // stops scrolling almost at the top of the screen
Mobile.swipe(startX, startY, endX, endY)

Alternatively, in cases where this happens again, you can skip using the Mobile.swipe function and go right to the Appium TouchAction functions:

import io.appium.java_client.AppiumDriver
import io.appium.java_client.TouchAction

AppiumDriver<?> driver = MobileDriverFactory.getDriver();
TouchAction touchAction = new TouchAction(driver);
device_Height = Mobile.getDeviceHeight()
device_Width = Mobile.getDeviceWidth()
int startX = device_Width / 2
int endX = startX
int startY = device_Height * 0.9
int endY = device_Height * 0.1
touchAction.longPress(startX, startY).moveTo(endX, endY).release().perform();

Hope this helps,

Chris