0
IList<AppiumWebElement> els = AppiumDriver.FindElementsByClassName("android.widget.LinearLayout");
var loc1 = els[12].Location;
var target = els[1];
var loc2 = target.Location;
var touchAction = new TouchAction(AppiumDriver);
touchAction.Press(loc1.X, loc1.Y).Wait(800).MoveTo(loc2.X, loc2.Y).Release().Perform();
//Assert.AreNotEqual(loc2.Y, target.Location.Y);

In mobile automation testing, I can swipe and click to element in the list. But I have to loop this.

The list consists of 30 items. It is iterated after every 10 elements.

How can I do this?

1
  • I posted pseudo-code on a similar question but it's like @Moorpheus said, loop scrolls until you see the element.
    – kirbycope
    Jan 28 at 6:09
1

Are there any elements that come after the list? E.g. a footer?

You could potentially have your loop check whether those elements are displayed/visible. When you're at the bottom of the list and they're visible then the loop would break.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.