Variable State Information in web form script

Forum for users of ANTS web server load testing tool

Moderator: Brian Donahue

Variable State Information in web form script

Postby carteltest » Tue Mar 06, 2007 7:05 pm

Hello. I am having difficulty modifying my recorded script to take State Information and make variable input for a web form.

My recorded script is:
WebClient.HttpRequest.Pragma = "no-cache"
WebClient.HttpRequest.ContentType = "multipart/form-data; boundary=---------------------------7d72114510340"
WebClient.HttpRequest.SetPostData(System.Text.Encoding.ASCII.GetBytes( _
"-----------------------------7d72114510340" & _
vbCrLf & _
"Content-Disposition: form-data; name=""ctl00$MainContent$SingleOrder1$txtAddress""" & vbCrLf & _
"" & vbCrLf & _
"700 Test Street" & vbCrLf & _
"-----------------------------7d72114510340" & _
"" & vbCrLf & _
"Content-Disposition: form-data; name=""ctl00$MainContent$SingleOrder1$txtCity""" & vbCrLf & _
"" & vbCrLf & _
"Denver" & vbCrLf & _

The data I want to take for State Information is street address (seen here as 700 Test Street and city name (seen here as Denver)

Please advise.
Regards.
carteltest
 
Posts: 1
Joined: Tue Mar 06, 2007 6:58 pm

State Info

Postby dhani43 » Wed Mar 07, 2007 10:53 am

Hi,

create 2 columns street_no and city in stae info table

dim street as string = stateinformation.get("street_no")
dim street as string = stateinformation.get("city")

where you find this "700 Test Street" replace with street
where you find this "denver" replace with city

if you want put me.logtofile(street & " " & city) check in Ants trace log file under C:\\program files\\ANTS Load directory.
Thanks,
Guru
dhani43
 
Posts: 2
Joined: Fri Mar 02, 2007 8:42 am


Return to ANTS Load

Who is online

Users browsing this forum: No registered users and 0 guests