Brownie

 view release on metacpan or  search on metacpan

lib/Brownie/Session.pm  view on Meta::CPAN

  $session->select($locator);

=item * C<unselect($locator)>

Unselects an option in multiple select.

  $session->unselect($locator);

=item * C<attach_file($locator, $filename)>

Sets a path to file upload field.

  $session->attach_file($locator, $filename);

=back

=head1 AUTHOR

NAKAGAWA Masaki E<lt>masaki@cpan.orgE<gt>

=head1 LICENSE

t/session/mechanize/attach_file.t  view on Meta::CPAN


    for (
        ['file1',       'file1'],
        ['File1 Label', 'file1'],
        ['File2 Label', 'file2'],
    ) {
        my ($locator, $id) = @$_;
        $bs->visit('/');

        ok $bs->attach_file($locator, $file_path);
        # XXX: should check whether file is uploaded
    }
};

done_testing;

t/session/selenium_server/attach_file.t  view on Meta::CPAN


    for (
        ['file1',       'file1'],
        ['File1 Label', 'file1'],
        ['File2 Label', 'file2'],
    ) {
        my ($locator, $id) = @$_;
        $bs->visit('/');

        ok $bs->attach_file($locator, $file_path);
        # XXX: should check whether file is uploaded
    }
};

done_testing;



( run in 1.785 second using v1.01-cache-2.11-cpan-b16cb0d3907 )