Search code examples
formsvbscriptsubmission

Automate form Submission


How to automate the submission of html form, with random text values using vbscript?


Solution

  • You can use the "Microsoft.XMLHTTP" to automate the form submittal. Please see below:

    Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    
    ' Notice the two changes in the next two lines:
    xml.Open "POST", "http://www.imdb.com/Find", False
    xml.Send "select=All&for=The Usual Suspects"
    
    wscript.echo xml.responseText
    

    Or take a look at these great posts:

    https://web.archive.org/web/20210728074446/https://www.4guysfromrolla.com/webtech/110100-1.2.shtml

    https://web.archive.org/web/20210927184623/http://www.4guysfromrolla.com/webtech/110100-1.shtml

    http://support.microsoft.com/kb/290591