Authentication
Avoid using Momentic tests to log in using SSO. Providers like Google, Facebook, and GitHub often have security measures that block automated browsers.
Username and password
Username and password authentication is the easiest and most straightforward method for authenticating users in your tests.
Email magic link
Prerequisites: An email address must be provisioned by Momentic.
Add a JavaScript step with the following content:
Use the Save to environment variable option to save the link to an environment variable, e.g., MAGIC_LINK
.
Then, use the Navigate step with content {{ env.MAGIC_LINK }}
to navigate to the magic link and complete the login process.
Email One-Time Password (OTP)
Prerequisites: An email address must be provisioned by Momentic.
Add a JavaScript step with the following content:
Use the Save to environment variable option to save the link to an environment variable, e.g., OTP_CODE
.
Then, use the Type step with content {{ env.OTP_CODE }}
to input the OTP code and complete the login process.
SMS One-Time Password (OTP)
Add a JavaScript step with the following content:
Use the Save to environment variable option to save the link to an environment variable, e.g., OTP_CODE
.
Then, use the Type step with content {{ env.OTP_CODE }}
to input the OTP code and complete the login process.
Vercel Deployment Projection
Follow the instructions here for Playwright. You can configure headers in test options.
IP whitelist
For teams that use Momentic Cloud, you can whitelist Momentic’s fixed egress IP: 34.106.239.183