You can refer any of the xpath which is given below, to locate the element using text :
Here you have to pass the complete sting which your element has else it wont work.
You can use
contains method in xpath to get your element matching based on full or partial given text.
To make more robust you can include attribute of that particular tag. here i have used
class attribute of span, that means span which have
class=messageText and contain
Still you are facing issue in getting element, try
ExplicitWaits until they are loaded in DOM.