This thread is trying to answer question "How to verify a newly created user via email by clicking a link?"
Does your automation need to cover the fact that the email is received, or do you just need access to the link in order to proceed with the test? If it's the latter, is there an API endpoint that can provide you with the link?
If so, you could get the link via the API in your test and navigate to it in your browser context which would simulate the user having clicked it from their email.
However if you actually need to test that the email arrives, I'm afraid that's not something I've tried before but hopefully someone else in the community can advise 🤞
We do this by having our outbound emails sent to the localhost:port of a mailhog installation, which in our case, is a docker container that sites alongside our software under test. So when I have created a new user, the email is routed to mailhog which I can then either open in a browser, find the email and do what I need to with it (click on a link etc), or I believe it also has an api to interact with (not tried that yet).
I can't give you details on how it is all setup, as I don't hold that information. But that is what we essentially do here to solve that problem. https://github.com/mailhog/MailHog
https://inbucket.org/ and https://github.com/axllent/mailpit webmail for email testing easy to use
Another great online tool for virtual email box https://webhook.site/
webhook site is also open source and can be installed as docker image https://docs.webhook.site/open-source.html
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].