Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1
Fill in username/password using webbrowser1 Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
Go Back  Xtreme Visual Basic Talk > > > Fill in username/password using webbrowser1


Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2015, 07:22 AM
pawglover pawglover is offline
Newcomer
 
Join Date: Jan 2011
Posts: 2
Default Fill in username/password using webbrowser1


Good Morning, I've been working on this all day yesterday and all night but for some reason its not working. I've done this on several other sites but for some reason its not working. Please help.


Website


Code:
td width="100%" style="padding-left:7px;">

    <input id="arg01_UserName" type="text" 10";"="" style="width:120px;color:black;font-size: 10pt;height:22px;maxlength=" name="arg01_UserName"></input>

</td>

Code:
<div id="passwordbox">

    <input id="arg02_Password" type="password" 10"="" style="width:120px;color:black;font-size: 10pt;height:22px;maxlength=" name="arg02_Password"></input>

</div>


Login Button
Code:
tr>

    <td width="100%" valign="bottom" height="36px" style="padding-left:7px;">
        <input class="mauth" type="submit" center";"="" style="width:98%;height:25px;align=" value="Login" name="Login"></input>
    </td>

</tr>


Here's what i've tried so far:
Code:
 Dim username = Me.WebBrowser1.Document.GetElementById("arg01_UserName")
        Dim password = Me.WebBrowser1.Document.GetElementById("arg02_Password")
        Dim login = Me.WebBrowser1.Document.GetElementById("Login")

        If username IsNot Nothing AndAlso password IsNot Nothing AndAlso login IsNot Nothing Then
            username.SetAttribute("value", "Admin")
            password.SetAttribute("value", "Admin")
            login.InvokeMember("click")
        End If


Code:
WebBrowser1.Document.GetElementById("arg01_UserName").SetAttribute("value", "Admin")

Code:
For Each ele As HtmlElement In WebBrowser1.Document.All

            If ele.GetAttribute("name") = "arg01_UserName" Then

                ele.SetAttribute("value", "Admin")

            End If

        Next

Code:
im elements = WebBrowser1.Document.GetElementsByTagName("input")   '' or whatever tag it is
        For Each element As HtmlElement In elements
            '' test here if this is the element of your interest.
            '' e.g.
            If element.GetAttribute("value") = "Login" Then
                element.InvokeMember("click")   '' if found, click it!
                Exit For
            End If
        Next


Its not passing the values and its not clicking the button. Any idea's?

Thanks!
Reply With Quote
  #2  
Old 04-22-2015, 01:57 PM
pawglover pawglover is offline
Newcomer
 
Join Date: Jan 2011
Posts: 2
Default

anyone? please.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1 Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1 Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
 
Fill in username/password using webbrowser1
Fill in username/password using webbrowser1
 
-->