NAME

Pherkin::Extension::Weasel - Pherkin extension for web-testing

VERSION

0.01

SYNOPSIS

   # 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:
              # 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
  # 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), providing access to a Weasel::Session and the following features:

Intended features to be implemented:

(More ideas welcome, please log issues.)

INSTALLATION

  # 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:

  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.

COPYRIGHT

Copyright (c)  2016  Erik Huelsmann

LICENSE

Same as Perl