Results 1 to 15 of 15

Thread: [RESOLVED] Need help sending data to webbrowser

  1. #1

    Thread Starter
    Addicted Member Jazz00006's Avatar
    Join Date
    Feb 2006
    Posts
    185

    Resolved [RESOLVED] Need help sending data to webbrowser

    Well, title says it all, I'm having trouble sending data to the webbrowser with the .document function

    I am trying to log into amazon.com automaticly and i have tried numerous methods

    such as:

    Code:
    PostData = StrConv("[email protected]&password=Y", vbFromUnicode)
    WebBrowser1.Navigate "https://www.amazon.com/gp/flex/sign-in/select.html/102-2175624-5181701?ie=UTF8&protocol=https", , , PostData
    and

    Code:
    WebBrowser1.Navigate "https://www.amazon.com/gp/flex/sign-in/select.html/102-2175624-5181701?ie=UTF8&protocol=https", , , PostData
    Do Until WebBrowser1.Busy = False
    DoEvents
    Loop
    
    WebBrowser1.Document.Forms(0).Item("email").Text = "[email protected]"

    can anyone shed any light on this,

    (will this also word with https? or should i give up)

  2. #2
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: Need help sending data to webbrowser

    This works for me.

    VB Code:
    1. Dim PageComplete As Boolean
    2.  
    3. Private Sub cmdLogin_Click()
    4. 'wb1 = webbrowser control
    5. wb1.Document.All("email").Value = "[email protected]" 'email address
    6. wb1.Document.All("password").Value = "YourPassword" 'password
    7. wb1.Document.Forms("sign-in").submit 'login
    8. End Sub
    9.  
    10. Private Sub Form_Load()
    11. 'wb1 = webbrowser control
    12. wb1.Navigate ("https://www.amazon.com/gp/flex/sign-in/select.html/102-2175624-5181701?ie=UTF8&protocol=https")
    13.  
    14. Do Until PageComplete = True
    15.     DoEvents
    16. Loop
    17.  
    18. End Sub
    19.  
    20. Private Sub wb1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    21.  
    22.     If pDisp = wb1 Then
    23.     PageComplete = True
    24.     End If
    25.    
    26. End Sub

  3. #3

    Thread Starter
    Addicted Member Jazz00006's Avatar
    Join Date
    Feb 2006
    Posts
    185

    Re: Need help sending data to webbrowser

    Ahh, so its Document.All, thanks alot ^.^

  4. #4
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: [RESOLVED] Need help sending data to webbrowser

    No probs

  5. #5
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: [RESOLVED] Need help sending data to webbrowser

    Wow, this is nice, will it work on other email sites like Yahoo and Hotmail?

  6. #6
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: [RESOLVED] Need help sending data to webbrowser

    Yes, you just to need to find the field names within the form and you'll be able to login.

  7. #7
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    Re: [RESOLVED] Need help sending data to webbrowser

    Hi all
    Just to check how you activate the "submit" button if the form itself does not have a name

  8. #8
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: [RESOLVED] Need help sending data to webbrowser

    Do you have an example URL we can look at?

  9. #9
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    Re: [RESOLVED] Need help sending data to webbrowser


  10. #10
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: [RESOLVED] Need help sending data to webbrowser

    that was an easy one

    VB Code:
    1. WebBrowser1.Document.All("custom_ip_address").Value = "192.168.0.1"
    2. WebBrowser1.Document.All("submit").Click

  11. #11
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    Re: [RESOLVED] Need help sending data to webbrowser

    Wow thankz a lot

  12. #12
    Lively Member
    Join Date
    Dec 2005
    Posts
    113

    Re: [RESOLVED] Need help sending data to webbrowser

    Awesome bit of code, definetly saving that for future reference.

  13. #13
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: [RESOLVED] Need help sending data to webbrowser

    Glad to help

  14. #14
    Junior Member totonho's Avatar
    Join Date
    Dec 2006
    Location
    Aarhus, Denmark
    Posts
    22

    Re: [RESOLVED] Need help sending data to webbrowser

    i can login in a window popup? like when login a ftp site?
    [VBCODE]on error go to VBForums[/VBCODE]

  15. #15
    Member
    Join Date
    Aug 2009
    Posts
    46

    Re: [RESOLVED] Need help sending data to webbrowser

    Thanks problem solved
    Last edited by linguist2000; Apr 13th, 2022 at 09:49 AM.

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