I order to click an element you need to swipe until the element become visible. There are several older postings on how to archive this.
However as methods where depreciated those old examples aren’t working any more and now I’m trying to work out how to perform that task in 2019.
Currently I am using the following pice of code to do the swipe:
var touchAction = new OpenQA.Selenium.Appium.MultiTouch.TouchAction (driver);
touchAction.Press (fromX, fromY);
touchAction.MoveTo (toX, toY);
touchAction.Release ();
touchAction.Perform ();
However, this is not interpreted as a swipe but as a fling which result to scrolling the content all the way to the bottom. It’s not possible to click an element in the middle that way.
I also tried to add some waits in the hope that then it won’t be interpreted as a fling.
var touchAction = new Appium_MultiTouch.TouchAction (driver);
touchAction.Press (fromX, fromY);
touchAction.Wait (ms: 1000);
touchAction.MoveTo (toX, toY);
touchAction.Wait (ms: 1000);
touchAction.Release ();
touchAction.Wait (ms: 1000);
touchAction.Perform ();
But that doesn’t work either. Now it won’t scroll at all. Does anybody know how to do this properly?
PS: such a common task should be part of the library.