[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VB WebBrowser Frames Login problem

Posted on 2004-10-29
8
Medium Priority
?
660 Views
Last Modified: 2013-12-26
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?
0
Comment
Question by:Ezes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
8 Comments
 
LVL 14

Expert Comment

by:Shiju Sasidharan
ID: 12450533
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
 

Author Comment

by:Ezes
ID: 12450577
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
 
LVL 17

Expert Comment

by:zzzzzooc
ID: 12451731
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Ezes
ID: 12454634
Thanks....It worked perfect....I can continue now....
0
 

Author Comment

by:Ezes
ID: 12455883
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
 

Author Comment

by:Ezes
ID: 12457189
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
 
LVL 17

Accepted Solution

by:
zzzzzooc earned 1000 total points
ID: 12460934
>>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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question