I am trying to select an image from Android image galley grid view. This grid view has ImageView
for every image. Every ImageView
has id.
So when i am trying to get by //ImageView[@id="someId"][1]
or by //GridView[@id="someId"]//ImageView[@id="someId"][1]
, it does not find it.
How can I select image from gallery using Selenium webdriver in ruby
.
EDIT:
<GridView id = "someId">
<LinearView>
<ImageView id = "someImageId"></ImageView>
</LinearView>
<LinearView>
<ImageView id = "someImageId"></ImageView>
</LinearView>
<LinearView>
<ImageView id = "someImageId"></ImageView>
</LinearView>
<LinearView>
<ImageView id = "someImageId"></ImageView>
</LinearView>
</GridView>
EDIT As Uiautomator cannot select the thumbnails in Gallery, I tried to pick image using relative co ordinates but this is giving an error.
Is any one has done this? I need to select image from android gallery.