NAKAGAWA Masaki > Brownie > Brownie::DSL

Download:
Brownie-0.09.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Brownie::DSL - provides DSL-Style interface to use browser session

SYNOPSIS ^

  use Brownie::DSL;

  # external server
  Brownie->driver('Mechanize');
  Brownie->app_host('http://app.example.com:5000');

  # PSGI app
  Brownie->driver('Mechanize');
  Brownie->app(sub { ...(PSGI app)... });

  # psgi file
  Brownie->driver('Mechanize');
  Brownie->app('app.psgi');

  visit('/');
  is title, 'Some Title';

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

  fill_in(q => 'Brownie');
  lick_link_or_button('Search');
  like title, qr/Search result of Brownie/i;

  done_testing;

CLASS METHODS ^

FUNCTIONS ^

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

syntax highlighting: