NAME

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

VERSION

version 0.18

SYNOPSIS

 # In the pherkin config file t/.pherkin.yaml:
 default:
   extensions:
     Pherkin::Extension::Weasel:
       default_session: selenium
       dom_save_events:
          step_fail: 1
       logging_dir: ./logs/
       screenshots_dir: img
       screenshot_events:
          pre_step: 1
          post_step: 1
          post_scenario: 1
          post_feature: 1
       sessions:
          selenium:
            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('*labeled', text => 'XYZ');
};

Test::BDD::Cucumber::Extension protocol implementation

step_directories
pre_execute
pre_feature
post_feature
pre_scenario

ATTRIBUTES

default_session
sessions
base_url

URL part to be used for prefixing URL arguments in steps

dom_save_events

Events which trigger saving the current browser DOM tree

Name of directory to store the browser-interaction logs

screenshots_dir

Name of directory to store screenshots generated during testing

screenshot_events

Events which trigger saving a screenshot of the current browser viewport

timestamps

Boolean. Default: false

If true, adds a timestamp prefix to browser interaction log lines

INTERNALS

_weasel
_save_dom($event, $phase)
_save_screenshot($event, $phase)

CONTRIBUTORS

Erik Huelsmann

MAINTAINERS

Erik Huelsmann

BUGS

Bugs can be filed in the GitHub issue tracker for the Weasel project: https://github.com/perl-weasel/weasel-driver-selenium2/issues

SOURCE

The source code repository for Weasel is at https://github.com/perl-weasel/weasel-driver-selenium2

SUPPORT

Community support is available through perl-weasel@googlegroups.com.

COPYRIGHT

(C) 2016-2023  Erik Huelsmann

Licensed under the same terms as Perl.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 431:

Unknown directive: =has