Selenium Java, how to get second text that wrapped double quotes?

I got this web page to test whether this element contains a certain keyword in it.

<div>
"&nbsp;"
"Network interface updated successfully"
</div>

This is the HTML code and the xpath I am trying to get is

//div[contains(text(),'interface')]

But this xpath doesn’t find this element at all. So I tried different way to figure out how it works.

//div/text()[2]

This xpath matches up the element, but it is not the best practice for me.

I attached the screen shot what I am suffering….. enter image description here

Answer

I Found Something similar to your example here enter image description here

now if you want the entire text enclosed within that element and you dont want to index through the scripts you can do it via java script executor enter image description here

run the below statement with java script executor and it will return the entire text, once you fetch the text you can assert if it contains the expected text.

‘return $x(“//div[@class=’jconfirm-content’]//div//div”)[0].textContent’