{"id":15062324,"url":"https://github.com/perl-weasel/weasel","last_synced_at":"2025-04-10T14:21:50.110Z","repository":{"id":49855510,"uuid":"51826768","full_name":"perl-weasel/weasel","owner":"perl-weasel","description":"Weasel - Perl's better Mink","archived":false,"fork":false,"pushed_at":"2023-07-24T20:48:18.000Z","size":134,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T13:04:00.109Z","etag":null,"topics":["behat","driver","mink","pageobject","pageobject-pattern","pageobjects","perl","test-automation","test-framework","testing","watir","watir-webdriver","weasel","web-application","webapp","webdriver"],"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/perl-weasel.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-16T10:14:20.000Z","updated_at":"2025-02-21T15:48:15.000Z","dependencies_parsed_at":"2024-06-18T20:11:23.584Z","dependency_job_id":"3ed0764d-a315-407f-9c46-82e465478c03","html_url":"https://github.com/perl-weasel/weasel","commit_stats":{"total_commits":114,"total_committers":3,"mean_commits":38.0,"dds":0.1228070175438597,"last_synced_commit":"0f5abe6e88124348d9ec8bb22655982f2d1ea3e2"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perl-weasel%2Fweasel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perl-weasel%2Fweasel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perl-weasel%2Fweasel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perl-weasel%2Fweasel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perl-weasel","download_url":"https://codeload.github.com/perl-weasel/weasel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248233935,"owners_count":21069493,"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":["behat","driver","mink","pageobject","pageobject-pattern","pageobjects","perl","test-automation","test-framework","testing","watir","watir-webdriver","weasel","web-application","webapp","webdriver"],"created_at":"2024-09-24T23:34:27.058Z","updated_at":"2025-04-10T14:21:50.092Z","avatar_url":"https://github.com/perl-weasel.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# NAME\n\nWeasel - Perl's php/Mink-inspired abstracted web-driver framework\n\n[![Build Status](https://travis-ci.org/perl-weasel/weasel.svg?branch=master)](https://travis-ci.org/perl-weasel/weasel)\n\n# VERSION\n\n0.29\n\n# SYNOPSIS\n\n```perl\n  use Weasel;\n  use Weasel::Session;\n  use Weasel::Driver::Selenium2;\n\n  my $weasel = Weasel-\u003enew(\n       default_session =\u003e 'default',\n       sessions =\u003e {\n          default =\u003e Weasel::Session-\u003enew(\n            driver =\u003e Weasel::Driver::Selenium2-\u003enew(%opts),\n          ),\n       });\n\n  $weasel-\u003esession-\u003eget('http://localhost/index');\n```\n\n# DESCRIPTION\n\nThis module abstracts away the differences between the various\nweb-driver protocols, like the Mink project does for PHP.\n\nWhile heavily inspired by Mink, `Weasel` aims to improve over it\nby being extensible, providing not just access to the underlying\nbrowser, yet to provide building blocks for further development\nand abstraction.\n\n[Pherkin::Extension::Weasel](https://github.com/perl-weasel/pherkin-extension-weasel)\nprovides integration with\n[Test::BDD::Cucumber](https://github.com/pjlsergeant/test-bdd-cucumber-perl)\n(aka pherkin), for BDD testing.\n\nFor the actual page interaction, this module needs a driver to\nbe installed.  Currently, that means\n[Weasel::Driver::Selenium2](https://github.com/perl-weasel/weasel-driver-selenium2).\nOther driver implementations, such as [Sahi](http://sahipro.com/)\ncan be independently developed and uploaded to CPAN, or contributed.\n(We welcome and encourage both!)\n\n\n## DIFFERENCES WITH OTHER FRAMEWORKS\n\n\n### Mnemonics for element lookup patterns\n\nThe central registry of xpath expressions to find common page elements\nhelps to keep page access code clean. E.g. compare:\n\n```perl\n   use Weasel::FindExpanders::HTML;\n   $session-\u003epage-\u003efind('*contains', text =\u003e 'Some text');\n```\n\nWith\n\n```perl\n   $session-\u003epage-\u003efind(\".//*[contains(.,'Some text')]\n                              [not(.//*[contains(.,'Some text')])]\");\n```\n\nMultiple patterns can be registered for a single mnemonic. These\nwhich be concatenated into a single xpath expression. This concatenated\nexpression allows to efficiently find matching elemnets with a single\ndriver query.\n\nBesides good performance, this has the benefit that the following\n\n```perl\n   $session-\u003epage-\u003efind('*button', text =\u003e 'Click!');\n```\n\ncan be easily extended to match\n[Dojo toolkit's](http://dojotoolkit.org/documentation/) buttons as well\nas regular buttens. The problem with Dojo's buttons is that their DOM\ntree doesn't actually contain (visible) BUTTON or INPUT tags. To load\nsupport for Dojo widgets, simply:\n\n```perl\n   use Weasel::Widgets::Dojo;\n```\n\n### Widgets encapsulate specific behaviours\n\nAll elements in `Weasel` are of the base type `Weasel::Element`, which\nencapsulates the regular element interactions (click, find children, etc).\n\nWhile most elements will be represented by `Weasel::Element`, it's possible\nto implement other wrappers.  These offer a logical extension point to\nimplement tag-specific utility functions.  E.g.\n`Weasel::Widgets::HTML::Select`, which adds the utility function\n`select_option`.\n\nThese widgets also offer a good way to override default behaviours.  One\nsuch case is the Dojo implementation of a `select` element.  This element\nreplaces the select tag entirely and in contrast with the original, doesn't\nkeep the options as child elements of the `select`-replacing tag.  By using\nthe Dojo widget library\n\n```perl\n   use Weasel::Widget::Dojo;\n```\n\nthe lack of the parent/child relation between the the select and its options\nis transparently handled by overriding the widget's `find` and `find_all`\nmethods.\n\n# INSTALLATION\n\n```sh\n  # Install Weasel\n  $ cpanm Weasel\n\n  # Install Weasel's web driver\n  $ cpanm Weasel::Driver::Selenium2\n```\n\nIf you want to use Weasel's support for Dojo-widget interaction, also:\n\n```sh\n  $ cpanm Weasel::Widgets::Dojo\n```\n\nIf you want to use Weasel with its Pherkin (BDD) integration, also:\n\n```sh\n  $ cpanm Pherkin::Extension::Weasel\n```\n\n# SUPPORT\n\n## BUGS\n\nBugs can be filed in the GitHub issue tracker for the Weasel project:\n https://github.com/perl-weasel/weasel/issues\n\n## DISCUSSION\n\nCommunity support is available through\n[perl-weasel@googlegroups.com](mailto:perl-weasel@googlegroups.com).\n\nChat support is available in the\n[#perl-weasel:matrix.org](https://vector.im/beta/#/room/#perl-weasel:matrix.org)\nchannel\n\n# COPYRIGHT\n\n```\nCopyright (c)  2016-2020  Erik Huelsmann\n```\n\n# LICENSE\n\nSame as Perl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperl-weasel%2Fweasel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperl-weasel%2Fweasel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperl-weasel%2Fweasel/lists"}