VB WebBrowser Frames Login problem

I'm Trying to automate a Login Proccess with WebBrowser Control. The web is www.aag.com.ar/clubes. The problem is that when I go to: IE.navigate "www.aag.com.ar/clubes" there is no "txtUsuario" field to fill. But if I go to IE.navigate "www.aag.com.ar/clubes/editorial.asp" I find it. The problem is that if I do the last option when I "click" on the Log In Link, it does nothing. It's like www.aag.com.ar/clubes is divided in Frames, but i check out this and only 2 frames appear. The Login Frame is not appearing. How can i handle this problem?
EzesAsked:
Who is Participating?
 
zzzzzoocConnect With a Mentor Commented:
>>Question Title: VB WebBrowser Frames Login problem
I believe your question is resolved.

>>but i don't want to be displayed the window for saving the file
You can handle it in the BeforeNavigate2() event. If it's the file is in the URL parameter, download it manually (through INET for example) and set Cancel to "True" so the browser does not navigate to it.

Since it's an entirely different question, I'm not going to comment further on it. I hope you understand.
0
 
Shiju SasidharanAssoc Project ManagerCommented:
Hi
First u navigate to
www.aag.com.ar/clubes
Whet this document gets completed try to navigage
www.aag.com.ar/clubes/editorial.asp
and after this Document is Loaded completely , "click" on the Log In Link

;-)
Shiju
0
 
EzesAuthor Commented:
I tried that by doing the following:
Ie.navigate "www.aag.com.ar/clubes"
on the Document_Complete: I use another control IE2 by:
IE2.navigate "www.aag.com.ar/clubes/editorial.asp" and
Set htmlelement = IE2.document.All.Item("txtUsuario")
htmlelement.Value = "C110GF"
Set htmlelement = IE2.document.All.Item"txtPassword")
htmlelement.Value = "C110GF"
Set htmlelement = IE2.document.links.Item(0)
htmlelement.Click

But still doesn´t work...
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
zzzzzoocCommented:
editorial.asp is within 2 different framesets (/   ->   /frahome.asp   ->  /editorial.asp).

Private Sub Command1_Click()
    Dim objDoc As Object
    Call WebBrowser1.Navigate("http://www.aag.com.ar/clubes/")
    Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
        DoEvents
    Loop
    'http://www.aag.com.ar/clubes/
    Set objDoc = WebBrowser1.Document
    'http://www.aag.com.ar/clubes/frahome.asp
    Set objDoc = objDoc.frames(1).Document
    'http://www.aag.com.ar/clubes/editorial.asp
    Set objDoc = objDoc.frames(1).Document
    'fill in form
    objDoc.frmLogin.txtUsuario.Value = "user?"
    objDoc.frmLogin.txtPassword.Value = "pass?"
    'submit form...
    Call objDoc.frmLogin.submit
End Sub
0
 
EzesAuthor Commented:
Thanks....It worked perfect....I can continue now....
0
 
EzesAuthor Commented:
oops..
I'm now having this error and don´t understand why...
I carry on "navigating" through this web and have to set 3 times the objDoc.
Set objDoc = IE.document
    Set objDoc = objDoc.frames(1).document
    Set objDoc = objDoc.frames(1).document
    Set objDoc = objDoc.frames(1).document

It ones worked, but now i have the following error:
-2147352567 Exception....
0
 
EzesAuthor Commented:
My mistake....i had commented some lines and didn´t notice it...The problem now is the following. I'm trying to download a file by "clicking" a link, but i don't want to be displayed the window for saving the file....
0
All Courses

From novice to tech pro — start learning today.