|
-
Jan 2nd, 2010, 09:30 PM
#1
Thread Starter
New Member
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
-
Jan 2nd, 2010, 10:43 PM
#2
Thread Starter
New Member
Re: Help with sendkeys and webbrowser
-
Jan 3rd, 2010, 02:31 AM
#3
Addicted Member
Re: Help with sendkeys and webbrowser
want the program to wait for the next page to load
vb Code:
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
'Do your event....
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!
-
Jan 3rd, 2010, 06:58 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|