Click here to Skip to main content
       

Visual Basic

 
Questionvb.net Web Browser Control! how to automate when web page is using frames. PinmemberKieran Sloan7-Nov-12 4:27 
A web page I'm trying to automate has come to my attention that it using frames. the source is and link to page is below:
 
url: http://www.konaeuropeadmin.com/[^]
 
My code so far...
 
Dim theElementCollection As HtmlElementCollection = KonaBrwsr.Document.GetElementsByTagName("input")
 
        For Each curElement As HtmlElement In theElementCollection
 
            Dim controlName As String = curElement.GetAttribute("name")
 
            If controlName = "loginname" Then
                curElement.SetAttribute("Value", "username")
            End If
 
            If controlName = "loginpassword" Then
                curElement.SetAttribute("Value", "password")
            End If
 
            If controlName = "savepassword" Then
                curElement.SetAttribute("Value", "True")
            End If
 
        Next
 
        Dim theElementCollection2 As HtmlElementCollection = KonaBrwsr.Document.GetElementsByTagName("input")
 
        For Each curElement2 As HtmlElement In theElementCollection2
 
            Dim controlName2 As String = curElement2.GetAttribute("name").ToString
 
            If controlName2 = "login" Then
                curElement2.InvokeMember("Click")
            End If
 
        Next
 

I know this works as I've used the same procedure for all the webpages I'm trying to automate... 15 in total; downloading files automatically.
 
The problem with this site is that it uses frames, and although I know my code work for a simple HTML form, I have no idea how to repeat this procedure for a framed website.
 
Someone please help, I've been on this for a while now and simply not working for me.
 
Thank you all in advance.
AnswerRe: vb.net Web Browser Control! how to automate when web page is using frames. PinmemberZaf Khan26-Nov-12 2:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.141022.2 | Last Updated 24 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid