I really need your help. I have an object that contains an iframe's content - Output of Chrome Dev Tools Console ( Sorry couldn't upload a inline screenshot of the code ).
I want to know how can I search programmatically if the text string "Welcome" exists in this object - it possible to navigate with Chrome Dev Tools to the element containing the text.
I have tried doing something as follows
var html = $("#HTML")[0]; // also tried $("#HTML").contents()
var iframeObj = JSON.stringify(html);
if(iframeObj.indexOf('Welcome') > -1)
{
alert('match found')
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
but this JSON.stringify(html) unfortunately exclude the content of the iframe in the resulting string. I also played around with Jquery's contents() to get the contents specifically of the iframe but to no avail.
Would appreciate your help