Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2011
    Posts
    18
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Form data collection in perl

    Hi,

    In short let me tell you what I am doing.

    I have a test automation framework, where a perl script takes some parameters and starts testing automated tests according to the parameters it received.

    Now I want these parameters to be collected from a intranet web form from a server consisting of textboxes, checkboxes, radio battons and submit button.

    I have created a form in perl using HTML like:

    #!/usr/bin/perl
    use strict;
    use warnings;
    use CGI;

    my $q=new CGI;
    print $q->header();


    print <<HTML;
    ##############################
    HTML CODE OF FORM
    ##############################

    HTML

    But I have no idea how to collect this form information on client side?
    I am looking for a code/solution by which I can send this filled data to framework (perl file at client) which will start automated testing taking this data as parameters?

    I read some posts which talks about GET and POST but I am unable to use it properly.

    Any other solution will be appreciated.

  • #2
    New Coder
    Join Date
    Jan 2011
    Posts
    18
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi Guys, I can see 37 people viewed this post but no reply yet.
    Any perl expert can help here?

  • #3
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,912
    Thanks
    2
    Thanked 164 Times in 159 Posts
    What do you mean by "collect this form information on client side"?

    The form is filled out on the client side and submitted to the server, not the other way around.

    To parse the form submission (on the server), use the CGI's param() method or Vars() method.

  • Users who have thanked FishMonger for this post:

    rkaranjkar (01-14-2011)

  • #4
    New Coder
    Join Date
    Jan 2011
    Posts
    18
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks FishMonger.

    >>What do you mean by "collect this form information on client side"?

    It was my typo. I wanted to say server side.

    Problem resolved (It was not working because I had not given names to all checkboxes and select fields).


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •