The class is: android.widget.HorizontalScrollView
What is the command to horizontal swipe using C#?
Im using a real Android device
Please if anyone can help been stuck on it for days!
The class is: android.widget.HorizontalScrollView
What is the command to horizontal swipe using C#?
Im using a real Android device
Please if anyone can help been stuck on it for days!
protected void SwipeLeft(AppiumWebElement row)
{
int xShift = Convert.ToInt32(row.Size.Width * 0.20);
int xStart = (row.Size.Width) - xShift;
int xEnd = xShift;
Swipe(row, xStart, xEnd);
}
private void Swipe(AppiumWebElement row, int xStart, int xEnd)
{
ITouchAction action = new TouchAction(driver)
.Press(row, xStart, (row.Size.Height / 2))
.Wait(1000)
.MoveTo(row, xEnd, (row.Size.Height / 2))
.Release();
action.Perform();
Thread.Sleep(2000);
}
great thanks!
I actually got it working anyway with AppiumUIDriver.Swipe() method