Results 1 to 4 of 4
  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2009

    Automatically Fill Text fields in Web page

    Pls help...

    How do i automatically fill username and password fields and click the submit button

  2. #2
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Searching for mendhak
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2009

    Re: Automatically Fill Text fields in Web page

    Thanks For the help Hack...

    But i also wanted to click the submit button automatically.

  4. #4
    Join Date
    Dec 2004

    Re: Automatically Fill Text fields in Web page

    vb Code:
    1. with wb.document.forms(0)
    2.  .all("username").value  = "myusername"
    3.  .all("Password").value = "mypass"
    4.  .submit
    5. end with
    where wb is a webbrowser control or instance of IE
    make sure the form you want to submit is form 0 top form on page
    put correct names for textboxes
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed

Posting Permissions

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


Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.