0
votes

unable to swipe on my ios app screen using appium.

i am using appium 1.3.1 with iso 8 iphone 6 simulator.

my ios screen is divided into two screens having image on the top and data below...

on the device we can swipe on any where , but not working with appium

I'm trying to run Appium 1.3.1 with iOS SDK 8.1 (Xcode 6.1)

2

2 Answers

1
votes

Perfectly Working solution:

WebElement webElement = wd.findElementByXPath(objectPath);
    try {
        //WebElement element = driver.findElement(By.xpath("//window[1]/tableview[2]"));

        JavascriptExecutor js = (JavascriptExecutor) wd;

        HashMap<String, String> scrollObject = new HashMap<String, String>();

        scrollObject.put("direction", "down");


        scrollObject.put("element", ((RemoteWebElement) webElement).getId());

        js.executeScript("mobile: scroll", scrollObject);
0
votes

scroll when string contains "abc" - driver.scrollTo("abc"); for exact string "abc" appear you can use - driver.scrollToExact("abc");