[Http-webtest-general] on_response question
Brought to you by:
m_ilya,
richardanderson
From: Remo B. <fo...@we...> - 2003-03-31 20:57:43
|
hi @all sorry for my possibly stupid question i have the follow test case --------- test_name = 'login with as admin (EN)' url = http://localhost/app/login.pl click_button = Login params = ( uid => admin passwd => foobar doit => login lang => EN ) #-- get sessionID on_response = { my $webtest = shift; ($SID) = $webtest->current_response()->headers->{refresh}; $SID =~ s/.*sessionID=([\d\w]+).*/$1/; []; } end_test test_name = 'logout admin (EN)' url = http://localhost/app/menu.pl params = ( tab => logout lang => EN sessionID => $SID ) end_test --------- why that does not do ? $SID isn't set ;((( note: - yes, i read all pod documents and the cookbook - yes, the regex for sessionID works my $SID = '0; URL=/app/menu.pl?sessionID=2eff4f3df913d371508aa03f2a390a77'; $SID =~ s/.*sessionID=([\d\w]+).*/$1/; print "$SID\n"; $> 2eff4f3df913d371508aa03f2a390a77 - yes, i use the latest version of module from cpan - yes, i use perl 5.8 ;))) thx for help cu -- RayMan <fo...@we...> |