To automate email verification using Selenium WebDriver in Java, use a public inbox like Mailinator. Navigate to the Mailinator website, enter the test inbox name, and open the latest email. Switch to the email’s iframe and locate the verification link using a partial link text, then click it to complete the verification. For Gmail, use the JavaMail API to fetch the email and extract the link, then use Selenium to open it. Public inboxes are easier to automate, while Gmail requires IMAP access and more setup.
Hope this helps!
Check out this Manual testing training to learn more.
Thanks!