NAF Nodes, Automation with Robotium


I’m having a problem in accessing some components on my UI using Robotium. I discovered there are some nodes (NAF nodes) that are not accesible from automated tool as Robotium.

Is there a way to access them? I would not use click using specific coordinates.

Could you suggest me the best practices for problems like this?

This is the image of layout seen from UI Automator.

UI Automator capture of screen

  • You must to post comments

If you want to access the elements of a particular list view the following code should help you achieve that:

ListView lv = (ListView) solo.getView(id); //id is view id).
if (lv.getChildCount() > 0) {
for (int i = 0; i < lv.getAdapter().getCount(); i++) {
// Code to access each row of the list view. In my case each row is a linear layout and has a text view.
LinearLayout linearLayout = (LinearLayout) Utils.getViewAtIndex(lv, i,
TextView accountName = (TextView) linearLayout.findViewById( id));
  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.