Stupid Drowndown boxes

Discussion in '.NET' started by prometheus, Oct 31, 2010.

  1. prometheus

    prometheus Make Money Online

    Joined:
    Oct 31, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Okay so i'm trying to make a simple bot to help with creating aol email accounts. I can populate all the fields and I can even solve the captcha with decaptcha but for some damn reason the dropdown boxes are giving me hell. Heres what i've tried so far

    Webbrowser1.Document.GetElemenbyID and then set attribute
    WebBrowser1.document.All.Item and then set attribute

    Setting the focus on the text box above the combo box then using send keys ot simulate a tab and a down arrow

    If you look at the page you'll see it has an ID field thats filled it. But if you run though aloop of all the elements on the page the program returns "" for the id. I'm stuck. Please help before I through this computer out the window .
    I'm trying to set up aol accounts so, I can post the link here becuase of my post count but its easy enough to find.
     
  2. griraim

    griraim Make Money Online Very Active Members

    Joined:
    Dec 20, 2009
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    0
    Post a code mate and I will have a look
     
  3. prometheus

    prometheus Make Money Online

    Joined:
    Oct 31, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Dim htmlinput As HtmlElementCollection
    htmlinput = WebBrowser1.Document.GetElementsByTagName("INPUT")
    '14
    Dim count As Integer = 1
    For Each input As HtmlElement In htmlinput
    'MsgBox(input.GetAttribute("id"))
    input.SetAttribute("option", "22")

    Next
    Dim el As HtmlElement = WebBrowser1.Document.All("wlw-select_key:{actionForm.acctSecurityQuestion}")
    Dim elCol As HtmlElementCollection = el.GetElementsByTagName("option")
    Dim X As Integer = 0
    For Each op As HtmlElement In elCol
    If op.InnerText = "What is your frequent flyer number?" Then
    el.SetAttribute("selectedIndex", X.ToString())
    Exit For
    End If
    X += 1
    Next
    MsgBox(WebBrowser1.Document.All.Item("wlw-select_key:{actionForm.dobMonth}OldValue").GetHashCode)
    WebBrowser1.Document.All.Item(
    "wlw-select_key:{actionForm.dobMonth}OldValue").SetAttribute("value", 1)
     
  4. andee

    andee Make Money Online Very Active Members

    Joined:
    Jan 2, 2010
    Messages:
    246
    Likes Received:
    8
    Trophy Points:
    18
    Location:
    ☆ ☆ ☆ ☆ ☆
    why dont you just POST it all with httpwebrequests ?

    Best thing I ever did was move away from webbrowser controls.

    ive got some source your can look at it fyou want.
     
  5. memme

    memme New Member

    Joined:
    Aug 7, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    I would also suggest to use the httpwebrequest and regex of course
     

Share This Page