I created an LoginActivity using Android Studio "new project" wizard. I added dependency on Robotium and wrote a simple test, extending from InstrumentationTestCase
:
launchActivity("com.my.package", LoginActivity.class, new Bundle());
solo.waitForActivity(LoginActivity.class, 1000);
solo.clickOnText("Sign in"); //inside my Activity
assertTrue("Not G+", solo.waitForActivity("GrantCredentialsWithAclActivity", 4000));
solo.clickOnText("Sign in"); //on Google+ dialog
But the "Not G+" assertion fails.
I've found from dumpsys that com.google.android.gms/.auth.login.GrantCredentialsWithAclActivity
is Google+ sign-in activity on my device. How it translates to name
parameter from solo.waitForActivity(name, timeout)
? Am I even able to click anything on Google+ dialog?