Examples of Using Webrecorder

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
testpro2
Newbie
Posts: 2
Joined: Mon Oct 28, 2013 4:18 am

Examples of Using Webrecorder

Post by testpro2 » Mon Oct 28, 2013 4:27 am

I see the description here: http://www.mjtnet.com/webrecorder.htm
"Business Intelligence
A mortgage broker checks the websites of his competitors every morning to see the rates they are offering. He used to manually copy the rate information from each competitor website and paste it into an Excel file so that he can do calculations and work out what rate he should offer. Now he uses WebRecorder to automatically connect to the competitor websites, enter in a fictitious search (area, house type, mortgage type, purchase price etc) and then extract the resultant rate data and save into Excel. The script now runs automatically every morning, gathering data from dozens of competitor websites."

Can someone give an actual script on how to do that?

Thanks in advance.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Oct 28, 2013 2:37 pm

The actual script will vary massively from web site to web site. You use WebRecorder to record the bulk of the actions. That quote describes a specific customer who relayed his experiences to us. We don't have his script which will be different for your web site/your requirements. I recommend you download Macro Scheduler and record the basic steps with WebRecorder. If you need help drop us a line on the help desk.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

testpro2
Newbie
Posts: 2
Joined: Mon Oct 28, 2013 4:18 am

Post by testpro2 » Mon Oct 28, 2013 6:23 pm

let's just look at one very simple case. If my excel sheet has only 2 rows and 3 column like this:

http://www.mjtnet.com/webrecorder.htm "internet macro" http://www.mjtnet.com/internet_macros.htm
http://www.mjtnet.com/forum/examples-of ... t8013.html mjtnet.com/blog http://www.mjtnet.com/blog/

Cell A1 and B1 are inputs, C1 is the return of a url, described as below:

A1=http://www.mjtnet.com/webrecorder.htm (go to visit this url)
B1=internet macro (click on internet macro)
C1= return the url, write into C1 as http://www.mjtnet.com/internet_macros.htm

for this very simple case, how do you do it?
thanks.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Oct 29, 2013 10:08 am

So really you want to visit a URL, parse the entire body of the page, find an "A" anchor element with innerText matching the value in column "B" and extract the URL target of that anchor?

That's not really a job for WebRecorder. I would do that with HTTPRequest. We would also need to make some assumptions:

1. What kinds of tags are we looking at - in this case looks like "A" tags but don't forget that things that look like ordinary A links may not be.

2. Are we looking for an exact match on the inner text, or some kind of a pattern?

3. And then we're pulling out the href attribute of the matching A tag right?

4. What if there are more than one match - output them all or just the first?

This seems like more of a "spider".
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts