I question why you’re testing receiving an email, when the process of receiving an email is completely out of your control. Additionally, as you can see, testing it using selenium is problematic because you are at the behest of the mail provider whenever they change their html.
If you insist on testing receipt of an email, it might be better to connect to the incoming mail server directly (via a socket connection) and look for the email that way — this even allows you to more easily test to ensure your headers are valid. Using POP or IMAP is a much more stable solution than scraping a web page.
But, in all earnest, ensuring the sending of an email should be sufficient enough, because that is something more within your control and is actually actionable on your end.