How to scrape option values from select element
a guest Jul 25th, 2016 119 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Public Sub selectscrape()
- Dim bot As New WebDriver, myselect As WebElement, options As WebElements, item As WebElement
- bot.Start "chrome", "http://www.roboform.com"
- bot.Get "/filling-test-all-fields"
- Set myselect = bot.FindElementByName("40cc__type")
- Set options = myselect.FindElementsByTag("option")
- For Each item In options
- MsgBox (item.Text)
- End Sub
- 'credits - codingislove.com
RAW Paste Data