SHARE
TWEET

How to scrape option values from select element

a guest Jul 25th, 2016 142 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Sub selectscrape()
  2. Dim bot As New WebDriver, myselect As WebElement, options As WebElements, item As WebElement
  3. bot.Start "chrome", "http://www.roboform.com"
  4. bot.Get "/filling-test-all-fields"
  5. Set myselect = bot.FindElementByName("40cc__type")
  6. Set options = myselect.FindElementsByTag("option")
  7. For Each item In options
  8. MsgBox (item.Text)
  9. Next
  10. End Sub
  11. 'credits - codingislove.com
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top