How to pick the first image from gallery by using index.
I have tried with below scenario but no one is working for selecting first image from gallery folder
driver.findElements(By.xpath("//com.sec.samsung.gallery.glview.composeView.PositionControllerBase$ThumbObject[@index=0]"));
driver.findElementByAndroidUIAutomator(“index(0)”).click();
and i am not able to locate an element by id because id not available, below are the source code which is available for locating element.
index 0
class com.sec.samsung.gallery.glview.composeView.PositionControllerBase$ThumbObject
package com.sec.android.gallery3d
bounds [4,228][359,583]