Results 1 to 4 of 4

Thread: Help with sendkeys and webbrowser

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2009
    Posts
    15

    Question Help with sendkeys and webbrowser

    Hey guys, I was hoping you would be able to help me out. I want to automate a process on a website, through my program. I want to do sendkeys to a web browser component, and also be able to focus on links and click them.
    Here is what I want:
    the browser is by default on page 1.
    there are a bunch of links on page 1, but i want the program to automatically click the link with inner html that says "Link 3". Next, i want the program to wait for the next page to load, then find another link. Finally, I want the program to focus in on a textbox, type some data, then click a submit button, which takes the browser back to page 1. I want this process to keep looping over and over again. Can anybody help me with the functions involved in waiting for a page to load then finding a link based on its html? Please help me out,
    Rusty Doorknobs

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2009
    Posts
    15

    Re: Help with sendkeys and webbrowser

    hyellop?

  3. #3
    Addicted Member
    Join Date
    Feb 2008
    Location
    XP & Vista
    Posts
    181

    Re: Help with sendkeys and webbrowser

    want the program to wait for the next page to load
    vb Code:
    1. Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted  
    2.  
    3. 'Do your event....
    4.  
    5. End sub

    To navigate the links you can use webbrowser1.navigate("your link...")

    Similar post: http://www.vbforums.com/showthread.php?t=595831

    All the best!
    _____________________________________________
    Regrads,
    kpmsivachand

    Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead;
    Walk beside me, and just be my friend.

    Need Reviews: 1. PDF Split, PDF Merge, PDF Encrypt, PDF Decrypt and PDF Watermark

    Need Reviews: 2. Folder Locker | Lock Folder | File Locker | Locker | Encrryption | Encrypt

  4. #4
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Help with sendkeys and webbrowser

    You don't use sendkeys to interact with a component in your own application.

    There are loads of questions on exactly the same subject on this board - if the one kpmsivachand linked above doesn't help just use the search facilities or look through the first few pages and you'll find examples.

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