Home > .NET, C/C++, Programming, Visual Basic > Iframe Webrowsercontrl Problem

Iframe Webrowsercontrl Problem

January 3rd, 2010

Yes I have posted on 12 forums and can get no one at all to help me. It’s crazy cause I know this has to be very easy.

Ok, I have made an account creator using the Webbrowser Control(just because i’m not skilled enough in httprequest,post,webclient etc..)

I’m using hotmail accounts so each confirmation email goes to the hotmail account and after the account is created I goto hotmail, then sign in no problem, then I navigate to the inbox which is no problem either, but once I try to figure out how to open the first mail I stumped. I have figured out now that the inbox is in an IFRAME. This is why i’m having the problem.

If you could help me with access the iframe using the webbrowser control or even maybe create code to sign into hotmail and click in the mail then I need to click the confirmation link to activate the account.

Which ever would be awesome. Here is all the code I have so far if it can help.

Here is my code so far. By the way I would love for this to be coded in Visual Basic 2008, if you have to it can be 2005 and if you do it in Visual C just make sure to convert it to vb.net for me.

Code:
WebBrowser1.Navigate(“http://www.hotmail.com”, Nothing, Nothing, Nothing)

Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
Loop

If Not TextExists(“Hotmail”, False) And TextExists(“Sign in”, False) Then GoTo start

If TextExists(“Sign in with a different account”, False) Then
clicklink(“Sign in with a different account”)
Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
Loop
Delay(3)
End If

Me.WebBrowser1.Document.GetElementById(“i0116″).InnerText = (emailused) : Delay(1)
Me.WebBrowser1.Document.GetElementById(“i0118″).InnerText = (pwused) : Delay(1)

Me.WebBrowser1.Document.GetElementById(“i0201″).InvokeMember(“click”) : Delay(2)
Me.WebBrowser1.Document.GetElementById(“SI”).InvokeMember(“click”) : Delay(1)

Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
Loop

Delay(3)

WebBrowser1.Navigate(“http://g.live.com/9uxp9en-us/hdr_main4??su=http://shared.live.com/Live.Mail”)

Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
Loop


Iframe Webrowsercontrl Problem

Comments are closed.
Bear