I am composing an email and sending it to myself. I want to verify the title and the body has the same text I gave
(note: the body might contain extra text like the signature added to it)
What is the best way in selenium
to verify if the body contains the text I have sent?
For eg:- I have sent text "hello"
into my body, but after sending it now has "hello sent fromxxx"
Using Java
. Looking for selenese
commands that can verify this.e
Can someone please suggest
I am using something like this
String bodyText = driver.findElement(By.tagName("body")).getText();
Assert.assertTrue("Text not found!", bodyText.contains(text));