Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[HELP!] VB.NET - Webbrowser - Send a key to webbrowser or Find button (NO ID)

I need help to:

Send a key to a webbrowser (Enter key)
OR
When i click Button1 then it clicks a button in the webbrowser that dosnt have ID

Code for button in webbrowser:
PHP Code

<?php 
<input type="submit" value="Log Inn" onmousedown="this.style.backgroundColor='#ddd';" onmouseup="this.style.backgroundColor='#eee';" onmouseover="this.style.backgroundColor='#eee';" onmouseout="this.style.backgroundColor='#fff';" /> 

            </
form> 

Thank You! :)✌
Try this

Code
Dim htelcol As HtmlElementCollection = _
  WebBrowser1.Document.GetElementsByTagName("input")
  For Each el As HtmlElement In htelcol
    If el.GetAttribute("type") = "submit" Then
    el.InvokeMember("click")
    End If
  Next

Thanks
[Image: 8Wj7xYL.gif]
Signature Created by Gσđfαtђα
the button doesn't have an "ID" so Stokerbandit if u are coding this put an ID to the button <ex? id="submit" </ex> and use System[X]s' code, else this solution is not working for you
Code
Try this

Code:
Dim htelcol As HtmlElementCollection = _
  WebBrowser1.Document.GetElementsByTagName("input")
  For Each el As HtmlElement In htelcol
    If el.GetAttribute("type") = "submit" Then
    el.InvokeMember("click")
    End If
  Next
//ibloodqman..
(Dec 23, 2011 05:10 AM)ibloodqman Wrote:  the button doesn't have an "ID" so Stokerbandit if u are coding this put an ID to the button <ex? id="submit" </ex> and use System[X]s' code, else this solution is not working for you
Code
Try this

Code:
Dim htelcol As HtmlElementCollection = _
  WebBrowser1.Document.GetElementsByTagName("input")
  For Each el As HtmlElement In htelcol
    If el.GetAttribute("type") = "submit" Then
    el.InvokeMember("click")
    End If
  Next
//ibloodqman..

My code used name not ID so it will work. (GetElementsByTagName)

Please read the code again and you will see that it does NOT use ID

Thanks
[Image: 8Wj7xYL.gif]
Signature Created by Gσđfαtђα


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by Shadow ReignSep 15, 2019 01:40 PM 3 169 Sep 15, 2019 01:40 PM
Last Post: Claw
[.NET] by LeonieHackPetaBytes2Jan 23, 2019 05:10 PM 1 227 Jan 23, 2019 05:10 PM
Last Post: 0xDEAD10CC
[.NET] by Johan CruyffJun 14, 2017 10:15 AM 11 358 Jun 14, 2017 10:15 AM
Last Post: fxbghacker