Clicking login button in webbrowser HELP ):
So i am trying to log in to meebo.com, the MSN specifically, and i am able to fill in the username and password box but i can't seem to get vb to click the login button.
WebBrowser1.Document.GetElementById("msnid").SetAttribute("Value", user.Text)
WebBrowser1.Document.GetElementById("msnpassword").SetAttribute("Value", pass.Text)
WebBrowser1.Document.GetElementById("imsignon").InvokeMember("click")
please help /: been at this for hours.
P.S I have been thinking that maybe if i make VB press the enter key in the password box it will have the same effect as pressing login. If so, may you help me figure out how to do this? ):
Re: Clicking login button in webbrowser HELP ):
Dont know if this is going to be any help , but you could look here.
http://www.vbforums.com/showthread.php?t=617286
The person has a similar sort of problem if im reading it right at the time in the morning, lol
Re: Clicking login button in webbrowser HELP ):
can you show me the html?
Re: Clicking login button in webbrowser HELP ):
Quote:
Originally Posted by
.paul.
can you show me the html?
<m id="imsignon" title="Sign On" tabindex="1" class="uiButton uiButton-big uiButton-normal uiButton-big-normal" style="-webkit-user-select: none; " ev_id="51">
pretty sure thats it.
Re: Clicking login button in webbrowser HELP ):
am i looking at the wrong page?
http://www.meebo.com/
Re: Clicking login button in webbrowser HELP ):
Quote:
Originally Posted by
.paul.
no that is the right page.
Re: Clicking login button in webbrowser HELP ):
Re: Clicking login button in webbrowser HELP ):
i'm looking. it's complicated
Re: Clicking login button in webbrowser HELP ):
Quote:
Originally Posted by
.paul.
i'm looking. it's complicated
Sorry, just stressed out, been trying to figure this out for hours.
Re: Clicking login button in webbrowser HELP ):
If it helps, Maybe making vb press the enter key while in the textbox would be easier.
Re: Clicking login button in webbrowser HELP ):
try this:
vb Code:
For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("input")
If element.GetAttribute("type") = "submit" Then
element.InvokeMember("click")
End If
Next
Re: Clicking login button in webbrowser HELP ):
Wow thanks it worked! I LOVE YOU :D
Re: Clicking login button in webbrowser HELP ):
haha... that's not necessary, but a rating shows appreciation:D
Re: Clicking login button in webbrowser HELP ):
usually don't respond to PM's OP, so feel special ;)
.paul.'s code should work. that web page's code is pretty sick looking when viewing source in browser. I do like how they put a solicitation for a programming job at the bottom of the code though lol
I also couldn't find this code anywhere on that page:
<m id="imsignon" title="Sign On" tabindex="1" class="uiButton uiButton-big uiButton-normal uiButton-big-normal" style="-webkit-user-select: none; " ev_id="51">
EDIT: looks like you got it working.
Re: Clicking login button in webbrowser HELP ):
Quote:
Originally Posted by
stateofidleness
usually don't respond to PM's OP, so feel special ;)
.paul.'s code should work. that web page's code is pretty sick looking when viewing source in browser. I do like how they put a solicitation for a programming job at the bottom of the code though lol
I also couldn't find this code anywhere on that page:
<m id="imsignon" title="Sign On" tabindex="1" class="uiButton uiButton-big uiButton-normal uiButton-big-normal" style="-webkit-user-select: none; " ev_id="51">
EDIT: looks like you got it working.
thats the html i got in chrome (: