I want to know how to check the web browser to see if a specific string of text exists.
For example, I want to validate that the string "Hello World" is visible on the browser. Any tips would be great. Thanks.
I want to know how to check the web browser to see if a specific string of text exists.
For example, I want to validate that the string "Hello World" is visible on the browser. Any tips would be great. Thanks.
This should do the trick for you...
if($('html:contains("Hello World")').length > 0){
alert('Hello World! I exist!');
}else{
alert('Goodbye cruel world!')
}