0

I'm trying to scroll the screen with but give me error that there is no such element in the view. I have tried some other ways but also fail to scroll to that row. I have no id-s because the rows are making dynamically and i only can scroll to particular element by "partialLinkText" property

JavascriptExecutor js = (JavascriptExecutor) driver;
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("direction", "down");
scrollObject.put("element", ((RemoteWebElement) driver.findelement(by.partialLinkText("Flow")).getId());
js.executeScript("mobile: scroll", scrollObject);

I have row with Text in it that is "Flow" but I can't find a way to scroll to that particular text . In Android it work with moveTo method , but in iOS it seems that it doesnt work. This is how I scroll to a row on the screen I am looking for :

    WebElement flow= driver.findElement(By.partialLinkText("Flow"));

    Actions action = new Actions(driver);

    // Scroll to Flow Row
    action.moveToElement(flow).build().perform();
Al Imran
  • 882
  • 7
  • 29
RosS
  • 317
  • 2
  • 6
  • 24

1 Answers1

0

There is way to scroll, it will scroll page not to the specific element, you can control it by changing coordinate and UP/DOWN as per your needs.

driver.executeScript("seetest:client.swipe(\"Down\", 700, 500)");

This script will execute if you use Appium Studio as Appium server

Al Imran
  • 882
  • 7
  • 29
  • I am looking for a way , how to scroll to particular text or field . in My cause with partialLinkText , and want not to use coordinates – RosS Jun 06 '18 at 10:27