Hello Com,
I am working with Appium since a while already and got a curious issue which I cant fix.
I am going to show you the code:
allgemein.TapOnNoten(driver);
noten.ConfigurePointSystem.Click();
noten.moveSeekBar("seekbarExam", 0, driver);
Thread.Sleep(5000);
noten.moveSeekBar("seekbarExam", 0.4, driver);
Thread.Sleep(5000);
noten.moveSeekBar("seekbarAssessment", 0, driver);
Thread.Sleep(5000);
noten.moveSeekBar("seekbarAssessment", 0.3, driver);
Thread.Sleep(5000);
noten.moveSeekBar("seekbarHomework", 0, driver);
and the function:
public void moveSeekBar(string id, double valueToMove, AppiumDriver<IWebElement> driver)
{
IWebElement seek_bar = driver.FindElement(By.Id(id));
int start = seek_bar.Location.X;
int end = seek_bar.Size.Width;
int y = seek_bar.Location.Y;
TouchAction action = new TouchAction(driver);
int moveTo = (int)(end * valueToMove);
action.Press(start, y).MoveTo(moveTo, y).Release().Perform();
}
The Problem is that he finds the first element “seekbarExam” as he should, but neither the “seekbarAssessment” or “seekbarHomework”. It doesnt matter if I start with seekbarExam or one of the other.
Heres the error:
System.InvalidOperationException: The coordinates provided to an interactions operation are invalid. (InvalidElementCoordinates)
Any solution?
Thanks in Advance