How to swipe on iOS Real device

Before hitting that Ask the Community button, make sure to:

  • Search for similar topics to make sure it hasn’t been asked by another member;
  • Write your topic title as a question (if possible) - this help with search
  • Give as much context as possible (screenshots, videos, links, code blocks, etc.) - this help the community help you
  • Use the katalon-studio tag followed by other appropriate tags for better visibility and searchability.
  • Make sure to remove this pre-filled content before posting. :smiley:

Hi my environment is
appium 2.5.1(xcuitest 7.3.1), katalon Studio 9.3.2.
before KSE was 8.x and appium 2.0
I uesd “TouchAction” to swipe page, but recently I can’t swipe anymore
even I tried to use
"
public static PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, “finger1”);
Sequence swipes = new Sequence(finger, 1);

swipes.addAction(finger.createPointerMove(Duration.ofMillis(0), PointerInput.Origin.viewport(), startX, startY));
swipes.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg())); swipes.addAction(finger.createPointerMove(Duration.ofMillis(durationTime), PointerInput.Origin.viewport(), endX, endY));
swipes.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Arrays.asList(swipes));
" so then I get this error
“groovy.lang.GroovyRuntimeException: Could not find matching constructor for: groovy.lang.Sequence(org.openqa.selenium.interactions.PointerInput, Integer)”

I think KSE looks not support that
now I use "
Actions actions = new Actions(BasePage.driver);
actions.tick(finger.createPointerMove(Duration.ofMillis(0), PointerInput.Origin.viewport(), centerX, centerY))
.tick(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()))
.tick(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));

	actions.perform();

" it works but when I tried to swipe like
"
Actions actions = new Actions(driver)
actions.tick(finger.createPointerMove(Duration.ofMillis(0), PointerInput.Origin.viewport(), startX1, startY1))
.tick(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()))
.tick(finger.createPointerMove(Duration.ofMillis(1500), PointerInput.Origin.viewport(), endX1, endY1))
.tick(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()))

	actions.perform()

" it doesn’t work

How I can swipe screen or object on iOS real device?!

1 Like

Hi,

Do you receive any error log?