cancel
Showing results for 
Search instead for 
Did you mean: 

Check webpage for containing specific text

romanmfs
Frequent 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

1 REPLY 1
baxatob
Community Hero

Re: Check webpage for containing specific text

Hi,

 

First of all please provide whats error did you receive after running the script above?

 

I ran your script, it normally opens the IE browser and navigating to the URL.

 

However you have not defined the obj variable and that is the problem.

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors