ComboBox - GetElementByID
2013-07-29, 03:17 AM, (This post was last modified: 2013-07-29, 04:03 AM by GraveYard.)
I need to pick a random value from a Combobox in Webbrowser
i see somewhere something with Invoke Click but i don't have ideea how to use it
[Image: somelsf.png]

WebBrowser1.Document.GetElementById("month-label").SetAttribute("value", ComboBox1)

At first element i have this code:
And second elemet is someting like

Hmm, i don't have idea how to explain better

I need a code that allow me to pick a random Month of Combobox
I need to select a random Month from Birthday


I resolve with this
Quote:Dim element As HtmlElement = WebBrowser1.Document.GetElementById("BirthMonth")
Dim month As HtmlElement = element.GetElementsByTagName("option").Cast(Of HtmlElement).First(Function(el) el.GetAttribute("value") = "05")
month.SetAttribute("selected", "true")
Share This Thread :

Related Threads
Thread Author Replies Views Last Post
  Default Value in Combobox JaxTeller 4 645 2013-11-25, 03:21 AM
Last Post: JaxTeller

About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top