views:

86

answers:

3

I have a website, and username and password, and usually I will login the website with the username and password, and select some items in check boxes and submit them to execute actions.

but right now i need to write a application to select the checkbox by some keywords and submit them automatically.

Do anyone have good idea ? I used IBM appscan before, it can automatically login my website, how does it implement that ?

A: 

You may be interested in HttpUnit.

Éric Malenfant
+1  A: 

You need some library that supports sessions from code. If doing this in Java, then as Eric has already said, you could use HttpUnit. Although this is a unit testing framework, it can be used for want you need to do.

This page explains both cookie handling (for sessions - I'm assuming you use cookies) and check box parameters in forms, using HttpUnit.

Once you've made the log on HTTP request from your code, you simply need to make HTTP requests which include the appropriate form parameters for your check boxes.

A_M
Once you've made the log on HTTP request from your code, you simply need to make HTTP requests which include the appropriate form parameters for your check boxes.DO you know what is the theory to accomplish this ?log on the server and remember the session with server ?
MemoryLeak
You shouldn't have to do anything server side. Imagine that HttpUnit is your browser. It deals with the session handling from the client side. Imagine each API call to make a HTTP request as you clicking your submit buttons or typing in a new address into the browser address bar. You shouldn't have to make any server side changes to do this.
A_M
A: 

Selenium is another tool that is designed for testing, but can do automated tasks that aren't really part of a test.

Michael Munsey