Anders Metnik
Anders Metnik

Reputation: 6237

Robotium Button gone, but still returns true from searchtext?

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)

Upvotes: 0

Views: 169

Answers (2)

ChristopheCVB
ChristopheCVB

Reputation: 7315

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

Upvotes: 1

Renas
Renas

Reputation: 1919

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

Upvotes: 2

Related Questions