https://github.com/perl-weasel/pherkin-extension-weasel
Extension for Test::BDD::Cucumber providing Weasel access
https://github.com/perl-weasel/pherkin-extension-weasel
bdd behavior-driven-development cucumber perl testing weasel web-app web-application webapp
Last synced: 2 months ago
JSON representation
Extension for Test::BDD::Cucumber providing Weasel access
- Host: GitHub
- URL: https://github.com/perl-weasel/pherkin-extension-weasel
- Owner: perl-weasel
- Created: 2016-02-16T10:15:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-05-24T15:19:58.000Z (about 1 year ago)
- Last Synced: 2025-12-13T06:31:52.424Z (7 months ago)
- Topics: bdd, behavior-driven-development, cucumber, perl, testing, weasel, web-app, web-application, webapp
- Language: Perl
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES
Awesome Lists containing this project
README
# NAME
Pherkin::Extension::Weasel - Pherkin extension for web-testing
[](https://travis-ci.org/perl-weasel/pherkin-extension-weasel)
# VERSION
0.16
# SYNOPSIS
```yaml
# In the pherkin config file t/.pherkin.yaml:
default:
extensions:
Pherkin::Extension::Weasel:
default_session: selenium
sessions:
selenium:
# write screenshots to img/
screenshots_dir: img
screenshot_events:
timestamps: 0
# generate screenshots before every step
pre_step: 1
# and at the end of every scenario
post_scenario: 1
base_url: http://localhost:5000
driver:
drv_name: Weasel::Driver::Selenium2
wait_timeout: 3000
window_size: 1024x1280
caps:
port: 4420
```
```perl
# Which makes the S->{ext_wsl} field available,
# pointing at the default session, in steps of features or scenarios
# marked with the '@weasel' tag so in the steps you can use:
use Weasel::FindExpanders::HTML;
Then qr/I see an input element with label XYZ/, sub {
S->{ext_wsl}->page->find('*labelled', text => 'XYZ');
};
```
# DESCRIPTION
This module implements an extension to [Test::BDD::Cucumber
(aka pherkin)](https://github.com/pjlsergeant/test-bdd-cucumber-perl),
providing access to a
[`Weasel::Session`](https://github.com/perl-weasel/weasel/) and the
following features:
* Starting sessions for scenarios which need it
* Taking screenshots on configured events
* Provide basic steps for
* Page navigation
* Page content assertion
Intended features to be implemented:
* Browser session transcript recording, annotating browser
manipulation invocations with Weasel function return
values and screenshots.
(More ideas welcome, please log issues.)
# INSTALLATION
```sh
# Install Pherkin::Extension::Weasel with its dependencies
$ cpanm Pherkin::Extension::Weasel
# Install the (currently only) Weasel web driver
$ cpanm Weasel::Driver::Selenium2
```
If you want to use the Dojo compatibility widgets, also:
```sh
cpanm Weasel::Widgets::Dojo
```
# SUPPORT
## BUGS
Bugs can be filed in the GitHub issue tracker for the Weasel project:
https://github.com/perl-weasel/pherkin-extension-weasel/issues
## DISCUSSION
Community support is available through
[perl-weasel@googlegroups.com](mailto:perl-weasel@googlegroups.com).
# COPYRIGHT
```
Copyright (c) 2016-2018 Erik Huelsmann
```
# LICENSE
Same as Perl