Hi,
I tried just writing the variable name,
and it got correctly substituted. So the following works fine :
userId = 'desl'
password = 'desl'
result = request301.POST('/cwf/e',
( NVPair('i', '5'),
NVPair('a', 'pressScriptButton'),
NVPair('f.0100',
userId),
NVPair('f.0200', password),
),
( NVPair('Content-Type', 'application/x-www-form-urlencoded'),
))
Thanks,
Pierre
Pierre.Deslandes <at> videotron.com
Envoyé par : grinder-use-bounces <at> lists.sourceforge.net
2008-05-13 13:27
|
Veuillez répondre à
grinder-use <grinder-use-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
|
|
|
A
|
<grinder-use-5NWGOfrQmneRv+LV9MX5uv+2+P5yyue3@public.gmane.orgt>
|
|
cc
|
|
|
Objet
|
[Grinder-use] Modifying grinder script
scenarios |
|
Hi,
Anybody knows how to, under TheGrinder verson3, modify the Jython script
scenarios to replace hardcoded string with variable values ?
I tried with prefixing the variable name with $, but it does not work.
For example, I tried to replace the
result = request301.POST('/cwf/e',
( NVPair('i', '5'),
NVPair('a', 'pressScriptButton'),
NVPair('f.0100',
'desl'),
NVPair('f.0200', 'desl'),
),
( NVPair('Content-Type', 'application/x-www-form-urlencoded'),
))
with
userId = 'desl'
password = 'desl'
result = request301.POST('/cwf/e',
( NVPair('i', '5'),
NVPair('a', 'pressScriptButton'),
NVPair('f.0100',
$userId),
NVPair('f.0200', $password),
),
( NVPair('Content-Type', 'application/x-www-form-urlencoded'),
))
Thanks,
Pierre -------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
grinder-use mailing list
grinder-use-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/grinder-use