Visual Web Ripper Logo Visual Web Ripper Logo
Welcome Guest Search | Active Topics | Log In | Register

Tag as favorite
How to submit a form with a list of input values?
Sequentum Support
#1 Posted : Thursday, July 08, 2010 8:00:39 PM

Groups: Administrators
Joined: 4/10/2010
Posts: 1,239
Location: Sydney, Australia
In this article I'll explain how to submit a form for each value in a simple list or in a CSV input file.

I have a list of US zip codes and I want to submit these values to the website http://zip4.usps.com/zip4/citytown_zip.jsp and extract matching cities.



First I create the project as if I only had one zip value. This is a very simple task:

1. I add a FormField element for the zip input field and enter a zip code in the Capture window (when you want to assign a value to a FormField element you can enter the value in the Capture window).

2. I add a FormSubmit template for the submit button.

3. I open the FormSubmit template and add a content element to extract the matching city.

If I want Visual Web Ripper to submit the form for a list of values, I can simply edit the zip FormField element and enter the list of value in the Capture window.



If I want Visual Web Ripper to read the input values from a CSV file (or a database table), I need to define an input data source and assign a data column to the zip FormField element. I do this by following these steps:

1. I create a CSV file with all the input values. Notice the CSV file must have a header row as shown below:



2. I copy the CSV file to the default Visual Web Ripper project folder. This is the default location for input files, but you can place the file anywhere you like.

3. I click the "Input Data Source" toolbar button, and select CSV as input format. Then I select the CSV file I just created.



4. I can view the input values by clicking the "View Data" button. Here I can also select the value I want to use when designing the project (Visual Web Ripper will use the first value by default).



5. I now edit the zip FormField content element and click the Database options tab. Here I choose the Input Data Source option and select the zip data column.



Visual Web Ripper will now read the zip codes from the CSV file and submit the form once for each zip code value.


File Attachment(s):
usps.zip (6kb) downloaded 85 time(s).
mystmn
#2 Posted : Tuesday, October 26, 2010 11:03:25 AM
Groups: Registered
Joined: 10/26/2010
Posts: 1
Is there a way to Input multiple text into the same form field?
For example I'm inputting data from an excel file. Column 1 has company names, column 2 has states. Is there a way to input row 1 of both columns into the same form field.
Thank you for your time.
Sequentum Support
#3 Posted : Tuesday, October 26, 2010 8:24:44 PM

Groups: Administrators
Joined: 4/10/2010
Posts: 1,239
Location: Sydney, Australia
Yes, but you'll need to use Input Transformation. For example:

return args.InputDataRow["column1"] + args.InputDataRow["column2"];
Users browsing this topic
Guest
Tag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.4 RC1 | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.100 seconds.