I'm using robotium to write tests for our android application. I'm looking to execute a command if a certain view or text exists. It would be ideal to check if the view/button exists, but I'm open to checking if the logout
text exists as well
My (incorrect) pseudocode would be something like this:
if solo.getView("logoutButton")) //if the logout button exists
solo.clickOnView(solo.getView("logoutButton")); //click it
end
I'm not familiar with robotium or android and would appreciate any insight.
What about the good old findViewById:
Edit: