Typing Secrets Securely
When typing sensitive information like passwords, use thesecret: true option to prevent the value from being logged or stored:
When
secret: true is set, the typed text appears as **** in all logs, recordings, and dashcam output.Storing Secrets in GitHub
Store sensitive credentials as GitHub repository secrets so they’re never exposed in your code:1
Navigate to Repository Settings
Go to your GitHub repository → Settings → Secrets and variables → Actions
2
Add Repository Secrets
Click New repository secret and add your secrets:
TD_API_KEY- Your TestDriver API keyTD_USERNAME- Test account usernameTD_PASSWORD- Test account password
3
Use in GitHub Actions
Reference secrets in your workflow file:
.github/workflows/test.yml
Local Development
For local development, store secrets in a.env file:
.env
Complete Example
Here’s a full login test with proper secrets handling:tests/login.test.js
Secrets Best Practices
- Always use
secret: truewhen typing passwords, tokens, or sensitive data - Use environment variables to keep secrets out of code
- Store secrets in your CI provider (GitHub Actions, GitLab CI, etc.)
- Never commit secrets to version control
- Rotate secrets regularly to maintain security

