On 4.2.2 emulator, in Now Playing screen from Music, we have the prev, play and next ImageButtons. Unfortunately these 3 buttons have no text or contet-desc values.
I want to click on one of them and I think the answer lies in something like:
UiObject relLayout = new UiObject(new UiSelector()
.className("android.widget.LinearLayout").index(1));
relLayout.click();
But there are several LinearLayout in this screen and I don't know how to select a specific LinearLayout. The code snipped above will press on shuffle as it is also a LinearLayout that contains 3 image buttons(library, shuffle and repeat).
The only thing we know about our LinearLayout is that it is the child, with index 5, of another LinearLayout which is the child, with index 0, of a FrameLayout which is the child, with index 0, of a LinearLayout which is the child, with index 0, of a FrameLayout.
The question is how can we tell UiSelector to look for a certain LinearLayout?
Thanks,
Alex