check if node is certain tag js code example
Example: if text exists in element using javascript
if (
(
document.documentElement.textContent || document.documentElement.innerText
).indexOf('Done successfuly') > -1
) {
// Do something...
}