Thread: Batching a task

    #1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2003
    Posts
    879
    Rep Power
    16

    Question Batching a task


    Is it possible to batch a file/ task that involves logging into a browser and filing up some form in the browser at the same time, involves clicking of buttons?

    Thanks
  2. #2
  3. Recovering Intellectual
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2006
    Location
    Orange County, CA
    Posts
    1,304
    Rep Power
    789
    It could be possible using the batch 'language' though I have no experience with it, other than to tell you that you might have better luck running another script written in some language of your choice.

    Python and Perl both have excellent network, HTTP modules that would easily automate a task like the one you describe. In this case the batch file may not be necessary, you could simply schedule your script instead.

    FYI, 'clicking' buttons is not necessary if you know what actions the buttons perform. In the case of a web-form, the button is only submitting the form data to the server. You could simply do this yourself with a POST request and skip the button alltogether. I have seen some interfaces that used javascript to process the interactions, perhaps to kill any attempts to automate the interaction, but I believe there is a way to get around that as well.
    Bugs that go away by themselves come back by themselves
    Beware - your loyalty will not be rewarded
  4. #3
  5. ASP.Net MVP
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Aug 2003
    Location
    WI
    Posts
    4,319
    Rep Power
    1515
    This just sounds painful, if it's even possible (not to mention a security risk if you all you need to do to get your system to interact with a random web site is run a batch file).

    At very least go for Windows Scripting Host.
    Primary Forum: .Net Development
    Holy cow, I'm now an ASP.Net MVP!

    [Moving to ASP.Net] | [.Net Dos and Don't for VB6 Programmers]

    http://twitter.com/jcoehoorn
  6. #4
  7. Can I get an Amen!
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2004
    Location
    Disclosed Location
    Posts
    1,070
    Rep Power
    578
    Yes

    Comments on this post

    • fishtoprecords agrees : man of few words
    The voice from the outer world
  8. #5
  9. Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Sep 2007
    Location
    outside Washington DC
    Posts
    2,576
    Rep Power
    3704
    Of course its possible. Its all software. Its just a SMOP.

    Doing this is a critical part of load testing a server. Build a program that is a browser, invent answers, and fire up thousands of threads to drive it.

    Its also a huge PITA when the web pages change. Such is life.
  10. #6
  11. Recovering Intellectual
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2006
    Location
    Orange County, CA
    Posts
    1,304
    Rep Power
    789
    Originally Posted by fishtoprecords
    Of course its possible. Its all software. Its just a SMOP.

    Doing this is a critical part of load testing a server. Build a program that is a browser, invent answers, and fire up thousands of threads to drive it.

    Its also a huge PITA when the web pages change. Such is life.
    Not to quibble with you fish, but what the hell does SMOP and PITA mean? I would maybe not use these acronyms when someone is clearly seeking advice on a topic he/she does not know the world about, right?
    Bugs that go away by themselves come back by themselves
    Beware - your loyalty will not be rewarded
  12. #7
  13. Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Sep 2007
    Location
    outside Washington DC
    Posts
    2,576
    Rep Power
    3704
    SMOP :== small matter of programming
    PITA :== pain in the rear

    Comments on this post

    • Matt1776 agrees : Gotcha ;0) I assumed they were technical in nature, I detract.
  14. #8
  15. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,782
    Rep Power
    4302
    Originally Posted by crackerweb
    Is it possible to batch a file/ task that involves logging into a browser and filing up some form in the browser at the same time, involves clicking of buttons?

    Thanks
    I'm the author of a python module that does precisely that. It clicks the buttons so any javascript behind the buttons will also fire.

    Comments on this post

    • Matt1776 agrees : Thats what I was saying!
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo