Tool to check a website for 404 errors

12 views
Skip to first unread message

Natasha

unread,
Oct 8, 2008, 10:02:44 AM10/8/08
to Watir General
Hello all,

Just a general question.

I was wondering if there is an opensource tool or any provision in
Watir, that will help me check any website for 404 errors.

I am planning to create one using Watir, but thought of checking if
there is already something available.

Thanks and regards,
Natasha

Natasha

unread,
Oct 8, 2008, 10:06:02 AM10/8/08
to Watir General

Alister Scott

unread,
Oct 9, 2008, 6:36:18 AM10/9/08
to Watir General
Hi Natasha,

This script I wrote should check for 404 errors and send an email when
they are found.
http://watirmelon.wordpress.com/2008/05/15/simple-web-application-monitoring-with-watir/

I use the watir method named check_for_http_error()

Hope this helps your cause.

If you do decide to develop something and can share it on the wiki,
that would be really great.

Cheers,
Alister Scott

Natasha Ranney

unread,
Oct 9, 2008, 7:46:51 AM10/9/08
to watir-...@googlegroups.com
Hi Alister,

Thanks for sharing the script :).

But this script seems to check only the main URL. I was looking for some script, which will scan through all the links for a particular website and list all those links that result in 404 errors.

So basically it will scan through each page and its corresponding links.  I do plan to write one, will share it on the wiki, once its ready.

Thanks,
Natasha

Alister Scott <aliste...@gmail.com> wrote:

Hi Natasha,

This script I wrote should check for 404 errors and send an email when
they are found.
http://watirmelon.wordpress.com/2008/05/15/simple-web-application-monitoring-with-watir/

I use the watir method named check_for_http_error()

Hope this helps your cause.

If you do decide to develop something and can share it on the wiki,
that would be really great.

Cheers,
Alister Scott


Alister Scott

unread,
Oct 9, 2008, 4:47:10 PM10/9/08
to Watir General
Hi Natasha,
Now I understand.
You may be able to use some of the logic in the script to iterate
objects on a page:
http://wiki.openqa.org/display/WTR/Save+All+Images+on+a+Webpage

Cheers
Alister

On Oct 9, 9:46 pm, Natasha Ranney <itsn...@yahoo.co.uk> wrote:
> Hi Alister,
>
> Thanks for sharing the script :).
>
> But this script seems to check only the main URL. I was looking for some script, which will scan through all the links for a particular website and list all those links that result in 404 errors.
>
> So basically it will scan through each page and its corresponding links.  I do plan to write one, will share it on the wiki, once its ready.
>
> Thanks,
> Natasha
>
> Alister Scott <alister.sc...@gmail.com> wrote:
>
> Hi Natasha,
>
> This script I wrote should check for 404 errors and send an email when
> they are found.http://watirmelon.wordpress.com/2008/05/15/simple-web-application-mon...

Bret Pettichord

unread,
Oct 9, 2008, 5:10:54 PM10/9/08
to watir-...@googlegroups.com
You might take a look at Jim Matthew's Link Checker.

http://www.io.com/~wazmo/blog/archives/2008_05.html#000277

Don Taylor

unread,
Oct 9, 2008, 6:11:48 PM10/9/08
to Watir General
Security:[SEC=UNCLASSIFIED]

Hi all


I've just used HttpWatch (free version ) http://httpwatch.com/ and the accompanying site-spider (http://httpwatch.com/rubywatir/) with good effect.

Cheers

Don

>>> Alister Scott <aliste...@gmail.com> 10/10/2008 7:47 am >>>
As a ComSuper employee, you are responsible for ensuring any email content you store or pass on, conforms to the ComSuper email policy and guidelines(as found on the ComSuper Intranet). You are also responsible for ensuring that any solicited email conforms to this policy, particularly those concerning official conduct. Further processing maybe undertaken to ensure email complies with ComSuper policy and guidelines. Please note that if you misuse the ComSuper IT computing facilities a formal investigation under the ComSuper procedures for Managing Breaches of APS Code of Conduct maybe instituted. In the event a breach is found, a range of possible sanctions apply, including possible termination of employment.

Alister Scott

unread,
Oct 9, 2008, 10:26:20 PM10/9/08
to Watir General
I might do an SVN checkout Matthew's code and include it in a wiki
example page.
I don't think we should expect first time Watir users looking for
example usage to install and checkout a SVN repo.
I'll ask him first, I noticed his Watir blog hasn't been updated since
Feb, does he still read this group I wonder?

Cheers,
Alister

Natasha Ranney

unread,
Oct 10, 2008, 4:40:34 AM10/10/08
to watir-...@googlegroups.com
Thanks Alister. That would be great.

Alister Scott <aliste...@gmail.com> wrote:

I might do an SVN checkout Matthew's code and include it in a wiki
example page.
I don't think we should expect first time Watir users looking for
example usage to install and checkout a SVN repo.
I'll ask him first, I noticed his Watir blog hasn't been updated since
Feb, does he still read this group I wonder?

Cheers,
Alister

Natasha Ranney

unread,
Oct 10, 2008, 4:57:13 AM10/10/08
to watir-...@googlegroups.com
Thanks Don. The solution you provided looks pretty good :)

I did quickly try it out. It looks really good, but need to explore it a bit.

Regards,
Natasha


Don Taylor <Don.T...@comsuper.gov.au> wrote:

Security:[SEC=UNCLASSIFIED]

Hi all


I've just used HttpWatch (free version ) http://httpwatch.com/ and the accompanying site-spider (http://httpwatch.com/rubywatir/) with good effect.

Cheers

Don

>>> Alister Scott 10/10/2008 7:47 am >>>


Hi Natasha,
Now I understand.
You may be able to use some of the logic in the script to iterate
objects on a page:
http://wiki.openqa.org/display/WTR/Save+All+Images+on+a+Webpage

Cheers
Alister

On Oct 9, 9:46 pm, Natasha Ranney wrote:
> Hi Alister,
>
> Thanks for sharing the script :).
>
> But this script seems to check only the main URL. I was looking for some script, which will scan through all the links for a particular website and list all those links that result in 404 errors.
>
> So basically it will scan through each page and its corresponding links. I do plan to write one, will share it on the wiki, once its ready.
>
> Thanks,
> Natasha
>

Bret Pettichord

unread,
Oct 10, 2008, 12:31:13 PM10/10/08
to watir-...@googlegroups.com
Jim is a friend who I see regularly. I'm not sure if he reads this list.

If we think this code should be made more available to people, the right
thing to do would be to create a release and post it to Rubyforge. I
actually administer this project, so have the rights to do this, or
could grant them to you.

But we really should hear from Jim first.

Bret

Reply all
Reply to author
Forward
0 new messages