问题
I'm testing my app with Robo test in Firebase Test Lab but my app can not start without Facebook Login and the Firebase emulator stuck at the Facebook Web Login.
I tried to record an "Espresso Test" and put my FB Test Login Credential but didn't work since it doesn't record the characters in the TextView in the Facebook Login WebView.
Is there any method by which I can put my Facebook test account credential to continue the test on the Firebase emulators?
Seems strange to me that Firebase built a good test environment but they can't put your FB credential for a test. (BTW I can't remove the Facebook Login because the app is based on FB information)
回答1:
Probably the best path to take is learning how to use UI Automator to reach into a WebView to manipulate its elements, exposed by Android's accessibility APIs. This is not straightforward, but definitely doable.
Writing tests for an android app that logs into Facebook: UIAutomator can't fill in text in Facebook's username field
来源:https://stackoverflow.com/questions/41748370/firebase-test-lab-how-to-perform-facebook-login-in-robo-test