Home: Perl Programming Help: Advanced:
HTML Forms



blizzard
Deleted

Jun 8, 2001, 7:55 AM


Views: 2829
HTML Forms

I'm working on a script that goes out and tests the functionality of websites. In order to do this it needs to fill out web based html forms and return them to the server and check the returned page. So far everything is working fine, the script can fill in text fields, and submit forms just fine. There are two problems that I haven't been able to solve.
There are couple of places that use file upload or download buttons. This is where the user can click on button and get a window which shows them the contents of their drive, and then they can choose either which file to upload, or where to download a file.
The download form looks like:
<form method="post" action="/cgi-bin/" enctype="mutipart/form-data">
<input type="submit" name="submit" value="Download">
<input type="hidden" name="function" value="Download">
</form>
The upload form is similar, though it has a:
<input type="file" name="file" size="20">
So far I've been using the value field to fill out the forms and submit them, though this doesn't work with these forms...
Any Ideas?



Jasmine
Administrator / Moderator

Jun 8, 2001, 10:22 AM


Views: 2825
Re: HTML Forms


In Reply To
<form method="post" action="/cgi-bin/" enctype="mutipart/form-data">

You can't post to the cgi-bin. Make sure the program is pointing to the program, not a directory.



blizzard
Deleted

Jun 8, 2001, 10:44 AM


Views: 2824
Re: HTML Forms

There is a file there that its pointing to, I just left it out, sorry. The problem is that I'm having trouble dealing with the browse fields since they ignore anything you put in for the value, which is what we've been doing up to now. Its an https site too by the way...