Hi guys, I try to scroll to element from flutter app using Appium. I want to access element via xpath. For this purpose use this script:
JavascriptExecutor js = (JavascriptExecutor) driver;
WebElement element = webDriver.findElement(By.xpath("//div[@class=‘et_pb_text_inner’]/p[2]"));
Map<String, Object> params = new HashMap<>();
params.put(“direction”, “down”);
params.put(“element”, ((RemoteWebElement) element).getId());
js.executeScript(“mobile: swipe”, params);
As a result the appium does not find the element and scrolls down the page below it. Can you please help what could be the problem?