Results 1 to 15 of 15

Thread: Clicking login button in webbrowser HELP ):

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    8

    Unhappy 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? ):

  2. #2
    Hyperactive Member
    Join Date
    Dec 2006
    Posts
    293

    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

  3. #3
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Clicking login button in webbrowser HELP ):

    can you show me the html?

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    8

    Re: Clicking login button in webbrowser HELP ):

    Quote Originally Posted by .paul. View Post
    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.

  5. #5
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Clicking login button in webbrowser HELP ):

    am i looking at the wrong page?

    http://www.meebo.com/

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    8

    Re: Clicking login button in webbrowser HELP ):

    Quote Originally Posted by .paul. View Post
    am i looking at the wrong page?

    http://www.meebo.com/

    no that is the right page.

  7. #7

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    8

    Re: Clicking login button in webbrowser HELP ):

    Not gonna help anymore?

  8. #8
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Clicking login button in webbrowser HELP ):

    i'm looking. it's complicated

  9. #9

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    8

    Re: Clicking login button in webbrowser HELP ):

    Quote Originally Posted by .paul. View Post
    i'm looking. it's complicated
    Sorry, just stressed out, been trying to figure this out for hours.

  10. #10

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    8

    Re: Clicking login button in webbrowser HELP ):

    If it helps, Maybe making vb press the enter key while in the textbox would be easier.

  11. #11
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Clicking login button in webbrowser HELP ):

    try this:

    vb Code:
    1. For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("input")
    2.     If element.GetAttribute("type") = "submit" Then
    3.         element.InvokeMember("click")
    4.     End If
    5. Next

  12. #12

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    8

    Re: Clicking login button in webbrowser HELP ):

    Wow thanks it worked! I LOVE YOU

  13. #13
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Clicking login button in webbrowser HELP ):

    haha... that's not necessary, but a rating shows appreciation

  14. #14
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    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.

  15. #15

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    8

    Re: Clicking login button in webbrowser HELP ):

    Quote Originally Posted by stateofidleness View Post
    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 (:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width