I have LinearLayout
with different child elements like LinearLayouts
and FrameLayouts
in hierarchy viewer. How can I click on their elements by solo.clickOnView
? I cant find any algorithm to get these Views, is it possible with getChild()
method?
You can access View by R.id:
solo.getView(int id);
solo.getView(String id);
You can access view by index:
solo.getView(Class<T> viewClass, int index);
Finally you can use whatever you want from android API, including getChild
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.