{"id":20596919,"url":"https://github.com/petdance/test-www-mechanize","last_synced_at":"2025-04-14T23:51:46.984Z","repository":{"id":643472,"uuid":"1655650","full_name":"petdance/test-www-mechanize","owner":"petdance","description":"Test::WWW::Mechanize, a Perl object for testing web pages","archived":false,"fork":false,"pushed_at":"2022-12-05T04:21:36.000Z","size":460,"stargazers_count":17,"open_issues_count":21,"forks_count":23,"subscribers_count":4,"default_branch":"dev","last_synced_at":"2025-03-28T11:51:11.668Z","etag":null,"topics":["bot","hacktoberfest","html","perl","testing"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petdance.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-04-24T03:36:34.000Z","updated_at":"2024-06-06T04:48:11.000Z","dependencies_parsed_at":"2023-01-13T10:33:11.112Z","dependency_job_id":null,"html_url":"https://github.com/petdance/test-www-mechanize","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petdance%2Ftest-www-mechanize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petdance%2Ftest-www-mechanize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petdance%2Ftest-www-mechanize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petdance%2Ftest-www-mechanize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petdance","download_url":"https://codeload.github.com/petdance/test-www-mechanize/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248981259,"owners_count":21193144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","hacktoberfest","html","perl","testing"],"created_at":"2024-11-16T08:19:28.472Z","updated_at":"2025-04-14T23:51:46.965Z","avatar_url":"https://github.com/petdance.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test-WWW-Mechanize\n\n* Build status: [![Build Status](https://github.com/petdance/test-www-mechanize/workflows/testsuite/badge.svg?branch=dev)](https://github.com/petdance/test-www-mechanize/actions?query=workflow%3Atestsuite+branch%3Adev)\n* cpantesters.org:\n[summary](http://www.cpantesters.org/distro/T/Test-WWW-Mechanize.html) and\n[dev FAILures](http://www.cpantesters.org/distro/T/Test-WWW-Mechanize.html?grade=3\u0026perlmat=2\u0026patches=2\u0026oncpan=2\u0026distmat=3\u0026perlver=ALL\u0026osname=ALL\u0026version=1.44)\n\n----\n\nTest::WWW::Mechanize is a subclass of the Perl module WWW::Mechanize\nthat incorporates features for web application testing.  For example:\n\n    use Test::WWW::Mechanize;\n\n    my $mech = Test::WWW::Mechanize-\u003enew;\n    $mech-\u003eget_ok( $page );\n    $mech-\u003ebase_is( 'http://petdance.com/', 'Proper \u003cBASE HREF\u003e' );\n    $mech-\u003etitle_is( 'Invoice Status', \"Make sure we're on the invoice page\" );\n    $mech-\u003etext_contains( 'Andy Lester', 'My name somewhere' );\n    $mech-\u003econtent_like( qr/(cpan|perl)\\.org/, 'Link to perl.org or CPAN' );\n    $mech-\u003eheader_is( 'Cache-Control', 'private', 'Caching is turned off' );\n    $mech-\u003elacks_header_ok( 'X-Foo', 'Does not have the X-Foo header' );\n\nThis is equivalent to:\n\n    use WWW::Mechanize;\n\n    my $mech = WWW::Mechanize-\u003enew;\n    $mech-\u003eget( $page );\n    ok( $mech-\u003esuccess );\n    is( $mech-\u003ebase, 'http://petdance.com', 'Proper \u003cBASE HREF\u003e' );\n    is( $mech-\u003etitle, 'Invoice Status', \"Make sure we're on the invoice page\" );\n    ok( index( $mech-\u003econtent( format =\u003e 'text' ), 'Andy Lester' ) \u003e= 0, 'My name somewhere' );\n    like( $mech-\u003econtent, qr/(cpan|perl)\\.org/, 'Link to perl.org or CPAN' );\n    is( $mech-\u003eresponse-\u003eheader( 'Cache-Control' ), 'private', 'Caching is turned off' );\n    ok( !defined $mech-\u003eresponse-\u003eheader( 'X-Foo' ), 'Does not have the X-Foo header' );\n\nbut has nicer diagnostics if they fail.\n\nTest::WWW::Mechanize also has functionality to automatically validate every page it goes to.\n\n    use Test::WWW::Mechanize;\n\n    my $mech = Test::WWW::Mechanize-\u003enew( autotidy =\u003e 1 );\n    $mech-\u003eget_ok( $url );\n\nwhich can give errors like this:\n\n    not ok 1 - GET $url\n    #   Failed test '$url'\n    #   at foo.pl line 7.\n    # HTML::Tidy5 messages for $url\n    # (11:1) Warning: missing \u003c/b\u003e before \u003c/body\u003e\n    # (7:18) Warning: \u003ca\u003e escaping malformed URI reference\n    # (7:18) Warning: \u003ca\u003e illegal characters found in URI\n    # (11:1) Warning: trimming empty \u003cb\u003e\n\nThe autotidy feature requires the HTML::Tidy5 module.  The similar,\nbut less robust, autolint feature requires the HTML::Lint module.\n\n# INSTALLATION\n\nTo install this module, run the following commands:\n\n    perl Makefile.PL\n    make\n    make test\n    make install\n\n# COPYRIGHT AND LICENSE\n\nCopyright (C) 2004-2018 Andy Lester\n\nThis library is free software; you can redistribute it and/or modify it\nunder the terms of the Artistic License version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetdance%2Ftest-www-mechanize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetdance%2Ftest-www-mechanize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetdance%2Ftest-www-mechanize/lists"}