Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 5841
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: gsagers [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.75_01
Fixed in: (no value)



Subject: error in back.t and follow_link
I'm getting the following errors trying to test WWW::Mechanize .75_01. They seem to be related to the new layout on Google, but I'm not sure. The first can be fixed by using "Images" instead of "Jobs" on line 24 of back.t, as the jobs link no longer exists. The second link also no longer appears to exist, but changing the word "tools" to any existing link doesn't help. t/link..................ok t/live/back.............ok 6/32Can't find any link matching Jobs on this page (http://www.google.com/intl/en/) at t/live/back.t line 24 t/live/back.............ok t/live/click............ok t/live/follow...........ok t/live/follow_link......ok 4/7Can't call method "is_success" on an undefined value at t/live/follow_link.t line 16. # Looks like you planned 7 tests but only ran 4. # Looks like your test died just after 4. t/live/follow_link......dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 5-7 Failed 3/7 tests, 57.14% okay t/live/form.............ok
From: Roger Waterhouse
I fixed follow_link.t by changing the regex in line 16 to qr/more/i, n=>1 and the url in the line 18 to http://www.google.com/options/index.html. Works great Modified file attached. Cheers Roger [guest - Tue Mar 30 16:54:06 2004]: Show quoted text
> I'm getting the following errors trying to test WWW::Mechanize .75_01. > They seem to be related to the new layout on Google, but I'm not sure. > > The first can be fixed by using "Images" instead of "Jobs" on line 24 > of back.t, as the jobs link no longer exists. > > The second link also no longer appears to exist, but changing the word > "tools" to any existing link doesn't help. > > > t/link..................ok > t/live/back.............ok 6/32Can't find any link matching Jobs on > this page (http://www.google.com/intl/en/) at t/live/back.t line 24 > t/live/back.............ok > t/live/click............ok > t/live/follow...........ok > t/live/follow_link......ok 4/7Can't call method "is_success" on an > undefined value at t/live/follow_link.t line 16. > # Looks like you planned 7 tests but only ran 4. > # Looks like your test died just after 4. > t/live/follow_link......dubious > Test returned status 255 (wstat 65280, 0xff00) > DIED. FAILED tests 5-7 > Failed 3/7 tests, 57.14% okay > t/live/form.............ok
use warnings; use strict; use Test::More tests => 7; use constant START => 'http://www.google.com/intl/en/'; use_ok( 'WWW::Mechanize' ); my $agent = WWW::Mechanize->new; isa_ok( $agent, 'WWW::Mechanize' ); my $response = $agent->get( START ); ok( $response->is_success, 'Got some page' ) or die "Can't even get Google"; is( $agent->uri, START, 'Got Google' ); $response = $agent->follow_link( text_regex => qr/more/i, n=>1 ); ok( $response->is_success, 'Got the page' ); is( $agent->uri, 'http://www.google.com/options/index.html', "Got the correct page" ); SKIP: { eval "use Test::Memory::Cycle"; skip "Test::Memory::Cycle not installed", 1 if $@; memory_cycle_ok( $agent, "No memory cycles found" ); }
Fixed in 0.75_02. Thanks for doin' the fix.