0

Title is my problem. Heres my code:

private void logout() {
        GridIconsView view = (GridIconsView) getActivity().findViewById(
                dk.lector.ao.mobile.R.id.GIV_settings);
        dragLeft();
        solo.clickOnView(view);
        solo.clearEditText(0);
        solo.clearEditText(1);
        boolean loggedIn = solo.searchText("Log ud");
        if (loggedIn){
            solo.clickOnButton("Log ud");
        }
        solo.finishOpenedActivities();

    }

System: ubuntu 11.10

Eclipse IDE indigo

Robotium 3.2.1 (Newest at present time)

Anders Metnik
  • 6,096
  • 7
  • 40
  • 79

2 Answers2

2

Use searchText() with onlyVisible parameter set to true. Please see the javadoc for more information.

Renas
  • 1,919
  • 1
  • 18
  • 17
1

You can also use searchView and apply the function isVisible on it...

ChristopheCVB
  • 7,269
  • 1
  • 29
  • 54