Hi I am pretty new to Appium. I was trying to Automate an app called as “Raaga”.
There are quite a few scrollable items on one screen, which can be scrolled to right or left.
can someone please help me solve this problem?
Screen shot attached.
I was trying with Below code:
while (driver.findElements(By.name(“Browse”)).size() == 0) {
Dimension dimensions = driver.manage().window().getSize();
//System.out.println(dimensions);
//Line below is to determine point where system will touch and start scrolling.
Double screenHeightStart = dimensions.getWidth() * 0.9;
int scrollStart = screenHeightStart.intValue();
//System.out.println(scrollStart);
//Lines below are to determine the point where the point will be when it will leave the touch point off screen
Double screenHeightEnd = dimensions.getWidth() * 0.5;
int scrollEnd = screenHeightEnd.intValue();
//System.out.println(scrollEnd);
//Line below is for touch action
new TouchAction(driver).press(scrollStart, 0).waitAction(1000).moveTo(scrollEnd, 0).release().perform();
}
I also tried:
driver.findElementByAndroidUIAutomator(“new UiScrollable(new UiSelector()” +
".resourceId(\"+com.raaga.android:id/music_catalog_item_line1+\")).scrollIntoView(" +
"new UiSelector().text(\"Browse\"));").click();<img src="/uploads/default/original/2X/6/62082c7a0e6fc9ccf556839af1e395785e0e34e3.png" width="281" height="500">