web1.navigate quick question
Hello everyone.
I have a problem that I wanted to see if it was possible to resolve. I have the following code. I wanted to know if it where possible to login and submit and follow a link and then from that same link follow another link inside of that url?
private sub command2_click()
Dim web1 As WebBrowser
set web1 = CreateObject("InternetExplorer.Application")
web1.Visible = true
web1.Navigate ("http://somewebsite.com")
do Until web1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
With web1.Document
.All("Userlogin").Value = "username"
.All("Password").Value = "password"
.Forms(0).submit
End with
End sub
This will only login. I trying to get to load that page along with a link that looks like web2.Document.Links(1).Click
but then after it loads the page, load another page inside of the new url all in the same browser. I hope this isn't confusing.
Re: web1.navigate quick question
Quote:
I hope this isn't confusing.
totally
you should be able to what you want easily enough, as long as the login does not open a new browser window
i have done like this before, but any testing would have to be done on thje specific web site,
after submitting the form you need to loop until ready with new document
Re: web1.navigate quick question
Im just not sure if its a matter of a loop or do I need to use another function. Can someone show me an example of what I am missing? Or do I need to better explain what I need to do?
Re: web1.navigate quick question
if the page loads into the same browser window then you have to wait for it to load, after that you can click any link or do whatever you want with that web page
if you make web1.visible = true, while testing you can see what is going on
Re: web1.navigate quick question
Quote:
Originally Posted by
westconn1
if the page loads into the same browser window then you have to wait for it to load, after that you can click any link or do whatever you want with that web page
if you make web1.visible = true, while testing you can see what is going on
I understand that part. Maybe I'll try this as and example.
1. Login Page
2. Main Menu
3. 1st hyperlink = titled page
4. Inside titled page then click another hyperlink
I want it to load different pages, one after another in that order. I have already used the web1.visible = true to see the output but the most I can make it do is login page to main menu. I hope that helps explain what Im trying to do.
Re: web1.navigate quick question
if you want me to help on this, pm me a link to the actual website, and login details, as i can't make a guess without being able to login
Re: web1.navigate quick question
Quote:
Originally Posted by
westconn1
if you want me to help on this, pm me a link to the actual website, and login details, as i can't make a guess without being able to login
There isn't a site I can give you at the moment but other then that but thanks anyways. Maybe I'll try rewording this in another forum post and see what I can come up with.