ASNMTAP
view release on metacpan or search on metacpan
lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pod view on Meta::CPAN
print $returns {title2}[1], "\n";
print $returns {title2}[2], "\n";
print $returns {title2}[3], "\n";
=item Example 6
use constant EXP_TITLE_1 => "\Q<TITLE>\E(Consulting Internet Technology Alex Peeters)\Q</TITLE>\E";
use constant EXP_TITLE_2 => "\Q<TITLE>\E(Consulting) (Internet) (Technology) (Alex Peeters)\Q</TITLE>\E";
use constant EXP_SUBMAIN => "\Q<FRAME NAME=\"NO_INFO\" SRC=\"\E(submain.htm)\Q\" SCROLLING=\"No\" FRAMEBORDER=\"0\" NORESIZE>\E";
use constant VAL_SUBMAIN => [0, sub { my %pages = ( 'index.htm' => 'InDeX', 'submain.htm' => 'subMAIN' ); $pages { $_[0] }; } ];
@URLS = (
{ Method => 'GET', Url => 'http://www.citap.com/', Qs_var => [], Qs_fixed => [], Exp => [EXP_SUBMAIN, 'Consulting Internet Technology Alex Peeters'], Exp_Fault => ">>>NIHIL<<<", Msg => "Consulting Internet Technology Alex Peeters", Msg_Fault => ...
{ Method => 'GET', Url => 'http://www.citap.com/', Qs_var => [parameter => 0], Qs_fixed => [], Exp => [EXP_SUBMAIN, 'Consulting Internet Technology Alex Peeters'], Exp_Fault => ">>>NIHIL<<<", Exp_Return => { title1 => EXP_TITLE_1 }, Msg => "Cons...
{ Method => 'GET', Url => 'http://www.citap.com/', Qs_var => [parameter => VAL_SUBMAIN], Qs_fixed => [], Exp => 'Consulting Internet Technology Alex Peeters', Exp_Fault => ">>>NIHIL<<<", Exp_Return => { title2 => EXP_TITLE_2, submain => EXP_SUBM...
);
$returnCode = $objectWebTransact->check ( { } );
my %returns = %{ $objectWebTransact->returns() };
$objectPlugins->pluginValues ( { alert => $returns {title1} .' - '. $returns {submain} .' - '. $returns {title2}[0] .' - '. $returns {title2}[1] .' - '. $returns {title2}[2] .' - '. $returns {title2}[3] }, $TYPE{REPLACE} );
equals to:
use constant EXP_TITLE_1 => "\Q<TITLE>\E(Consulting Internet Technology Alex Peeters)\Q</TITLE>\E";
use constant EXP_TITLE_2 => "\Q<TITLE>\E(Consulting) (Internet) (Technology) (Alex Peeters)\Q</TITLE>\E";
use constant EXP_SUBMAIN => "\Q<FRAME NAME=\"NO_INFO\" SRC=\"\E(submain.htm)\Q\" SCROLLING=\"No\" FRAMEBORDER=\"0\" NORESIZE>\E";
use constant VAL_SUBMAIN => [0, sub { my %pages = ( 'index.htm' => 'InDeX', 'submain.htm' => 'subMAIN' ); $pages { $_[0] }; } ];
use constant RET_SUBMAIN => [0, sub { my %returns = %{ $objectWebTransact->returns() }; defined $returns { 'submain' } ? $returns { 'submain' } : ''; } ];
use constant RET_TITLE1 => [0, sub { my %returns = %{ $objectWebTransact->returns() }; defined $returns { 'title1' } ? $returns { 'title1' } : ''; } ];
@URLS = (
{ Method => 'GET', Url => 'http://www.citap.com/', Qs_var => [], Qs_fixed => [], Exp => [EXP_SUBMAIN, 'Consulting Internet Technology Alex Peeters'], Exp_Fault => ">>>NIHIL<<<", Msg => "Consulting Internet Technology Alex Peeters", Msg_Fault => ...
);
$returnCode = $objectWebTransact->check ( { } );
@URLS = (
{ Method => 'GET', Url => 'http://www.citap.com/', Qs_var => [parameter => 0], Qs_fixed => [], Exp => [EXP_SUBMAIN, 'Consulting Internet Technology Alex Peeters'], Exp_Fault => ">>>NIHIL<<<", Exp_Return => { title1 => EXP_TITLE_1 }, Msg => "Cons...
{ Method => 'GET', Url => 'http://www.citap.com/', Qs_var => [parameter => VAL_SUBMAIN, submain => RET_SUBMAIN, title1 => RET_TITLE1], Qs_fixed => [], Exp => 'Consulting Internet Technology Alex Peeters', Exp_Fault => ">>>NIHIL<<<", Exp_Return =...
);
$returnCode = $objectWebTransact->check ( { } );
=item Example 7
@URLS = (
{ Method => 'GET', Url => 'https://USERNAME:PASSWORD@secure.citap.be/authorization/', Qs_var => [], Qs_fixed => [], Exp => "Testing Client Authorization", Exp_Fault => ">>>NIHIL<<<", Msg => "Testing Client Authorization", Msg_Fault => "Testing Cl...
);
$returnCode = $objectWebTransact->check ( { } );
equals to:
@URLS = (
{ Method => 'GET', Url => 'https://secure.citap.com/authorization/', Qs_var => [], Qs_fixed => [], Exp => "Testing Client Authorization", Exp_Fault => ">>>NIHIL<<<", Msg => "Testing Client Authorization", Msg_Fault => "Testing Client Authorizatio...
);
$objectWebTransact->ua->credentials ( 'secure.citap.com:443', "ASNMTAP's Authorization Access", 'USERNAME', 'PASSWORD' );
$returnCode = $objectWebTransact->check ( { } );
=back
=head1 TOOLS
=over 4
=item GrinderCaptureConverter.pl
./GrinderCaptureConverter.pl -i /opt/grinder-2.8.6/examples/asnmtap/www.citap.be-grinder.proporties -o /opt/grinder-2.8.6/examples/asnmtap/www.citap.com.txt -f WEBTRANSACT
=over 4
=item The Grinder 2
more information can found at: http://grinder.sourceforge.net/
=item Needed to run The Grinder
Java 2 Standard Edition 1.3.1, equivalent, or later
=item How do I start The Grinder to capture?
more information can found at: http://grinder.sourceforge.net/manual/tcpsniffer.html
=item Start an agent process
mkdir /opt/grinder-2.8.6/capture
cd /opt/grinder-2.8.6/capture
CLASSPATH=/opt/grinder-2.8.6/lib/grinder.jar; export CLASSPATH or CLASSPATH=../../lib/grinder.jar; export CLASSPATH
java net.grinder.TCPSniffer -proxy -httpPluginFilter > /opt/grinder-2.8.6/capture/grinder
or
cd /opt/grinder-2.8.6/examples/asnmtap
java -classpath /opt/grinder-2.8.6/lib/grinder.jar net.grinder.TCPSniffer -proxy -httpPluginFilter> /opt/grinder-2.8.6/capture/grinder
=item How do I set Internet Explorer to capture?
Set for internet explorer the proxy setting to 127.0.0.1 with port 8001
=item How do I Capture a website?
Start surfing throug Internet Explorer
=item How do I stop the Capture?
Press 'ctrl C'
=back
=back
=head1 BUGS
B<you> must identify the URLs and the query strings required by the transaction
using tools like grinder or by examining the HTML source of the forms.
=head1 AUTHOR
( run in 1.331 second using v1.01-cache-2.11-cpan-39bf76dae61 )