Automate Facebook Sign-Up (Android)
Automate Facebook sign-up on Android with random data, permission dialogs, and native date picker interactions.
The workflow
1. The sign-up flow
# facebook.yaml
appId: com.facebook.katana
---
- launchApp:
clearState: true # Ensures we start at the landing page every time
- tapOn: "Create new Facebook account"
- assertVisible: "Join Facebook"
- tapOn: "Next"
# Step 1: Handling System Permission Dialogs
- assertVisible: "Allow Facebook to access your contacts?"
- tapOn: "Allow"
- assertVisible: "Allow Facebook to make and manage phone calls?"
- tapOn: "Allow"
# Step 2: Name Entry with Random Data
- inputRandomPersonName
- tapOn: "Last Name"
- inputRandomPersonName
- tapOn: "Next"
# Step 3: Interacting with the Native Date Picker
- assertVisible: "What's your birthday?"
# We use longPressOn to focus the system NumberPicker fields
- longPressOn:
id: "android:id/numberpicker_input"
index: 0
- inputText: "Jan"
- longPressOn:
id: "android:id/numberpicker_input"
index: 1
- inputText: "01"
- longPressOn:
id: "android:id/numberpicker_input"
index: 2
- inputText: "2000"
- pressKey: Enter
- tapOn: "Next"
# Step 4: Profile Details
- tapOn: "Male"
- tapOn: "Next"
- tapOn: "Sign up with email address"
- assertVisible: "Enter your email address"
- inputRandomEmail
- tapOn: "Next"
# Step 5: Password and Finalize
- assertVisible: "Choose a password"
- inputRandomText
- tapOn: "Next"
- tapOn: "Sign up"2. Implementation
Related content
Last updated