NAKAGAWA Masaki > Brownie-0.08 > Brownie

Download:
Brownie-0.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.08   Source   Latest Release: Brownie-0.09

NAME ^

Brownie - Browser integration framework inspired by Capybara

SYNOPSIS ^

OO-Style

  use Test::More;
  use Brownie::Session;

  # external server
  my $session = Brownie::Session->new(
      driver   => 'Mechanize',
      app_host => 'http://app.example.com:5000',
  );

  # PSGI app
  my $session = Brownie::Session->new(
      driver => 'Mechanize',
      app    => sub { ...(PSGI app)... },
  );

  # PSGI file
  my $session = Brownie::Session->new(
      driver => 'Mechanize',
      app    => 'app.psgi',
  );

  $session->visit('/');
  is $session->title => 'Some Title';

  $session->fill_in('User Name' => 'brownie');
  $session->fill_in('Email Address' => 'brownie@example.com');
  $session->click_button('Login');
  like $session->source => qr/Welcome (.+)/;

  $session->fill_in(q => 'Brownie');
  $session->click_link_or_button('Search');
  like $session->title => qr/Search result of Brownie/i;

  done_testing;

DSL-Style

NOT IMPLEMENTED YET

DESCRIPTION ^

Brownie is browser integrtion framework. It is inspired by Capybara (Ruby).

VOCABULARY ^

AUTHOR ^

NAKAGAWA Masaki <masaki@cpan.org>

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO ^

Brownie::Session

Capybara

syntax highlighting: