I have a method below where I retrieve a HTML tag:
public void CheckEmailDisplayed()
{
var email = _driver.FindElement(ConfirmationResponsiveElements.ViewEmail);
}
ViewEmail is below:
public static By ViewEmail => By.ClassName("confirmation-banner__text");
The HTML it corresponds to is:
<div class="confirmation-banner__text firefinder-match">
<p>
We've sent an email to
<strong>[email protected]</strong>
</p>
<p>
</div>
What I want to do is be able to use the variable email to check that the text contains an @. This is to help determine an email address is displayed. How can this be achieved?
Thanks