How to swipe in a specific area until target element is show?

it will not help in this way. create your function that will swipe by element. some examples like β†’ https://appium.io/docs/en/writing-running-appium/tutorial/swipe/simple-element/

Updated link 12-2024

the only problem that TouchAction is deprecated. and you need replace it with something new :slight_smile:

i use appium w3c β†’ https://appium.io/docs/en/commands/interactions/actions/

mine code example is:

                PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
                Sequence tapSeq = new Sequence(finger, 1);
                tapSeq.addAction(finger.createPointerMove(Duration.ofMillis(0),
                        PointerInput.Origin.viewport(), centerX, centerY));
                tapSeq.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
                tapSeq.addAction(finger.createPointerMove(Duration.ofMillis(200),
                        PointerInput.Origin.viewport(), endX, endY));
                tapSeq.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
                driver.perform(Arrays.asList(tapSeq));