Authorization notice. Droidline is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.
Credentials. The one-time codes and login details the script handles are sensitive, so keep them out of logs and shared output.
Who it is forA QA engineer testing a sign-in that sends a one-time code by text message or notification.
The problemAutomated tests stall at a code sent to a phone, and the code is hard to pass into the app without manual steps.
The outcomeA test that waits for the code notification, reads the code from the app, and enters it in the login field.
What you need first
- A PC running Windows, macOS, or Linux
- An Android phone running Android 9 or later
- The droidline archive for your system from the Releases page
- droidline-agent.apk from the same release page, installed on the phone
- Python 3.9+ or Node.js 18+ if you want to script, or an MCP-capable agent app
Steps
- Run
droidline serveand pair the phone withdroidline pair. - Trigger the sign-in flow from your script so the code is sent to the phone.
- Wait for the notification on the PC side and read the code from the app that received it.
- Enter the code into the login field with input() and tap the confirm button.
- Verify the next screen loads by checking for an expected element.
Prompt for your agent
Using the Droidline repo at https://github.com/KnifeLemon/Droidline, write a Python test that starts the sign-in flow in <app package name>, waits for the notification that carries the one-time code, enters it into the field with id <code field id>, and checks that the element with text <expected text> appears. Report pass or fail and the code length, not the code itself.
Caveat. Android 15 and later hide one-time codes in notifications from apps, so the code may have to be read inside the app instead.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for KnifeLemon/Droidline and "Read a login code from a phone notification during a test"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer