romanmfs
7 years agoFrequent Contributor
Check webpage for containing specific text
Hi all!
I have a small experience working with scrips.
Need help getting this to work:
function Test()
{
var url = "https://www.consolidatedcredit.org";
Browsers.Item(btIExplorer).Run(url);
var browser = Sys.Browser("*");
var body = browser.Page("*").contentDocument.body;
var str = "debt";
// Checks the result
if (obj.Exists)
Log.Message("Object containing text '" + str + "' is found", obj.FullName);
else
Log.Warning("Object containing text '" + str + "' was not found.");
}
What I try to achieve: to search the site (consolidatedcredit.org) for any text that includes a letter "debt".
Can you guys help me with what I am missing? The current test does not even open up the URL specified.
Thanks,
Roman