Search code examples
androidui-automationrobotium

Android & Robotium - waitForActivity doesn't fail when it's supposed to?


solo.clickOnButton("Login");
solo.waitForActivity("activityThatDoesntExist", 20000);

application navigates to an activity named "HomePageActivity", but the test passes even though the activity name is incorrect? Why does it pass?


Solution

  • waitForActivity() returns 'false' when the Activity isn't found within the timeout period.