Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim cd As Selenium.ChromeDriver
- Sub Test()
- Dim BaseURL As String
- Dim DateOptions As List 'Selenium.WebElements
- Dim DateOption As SelectElement 'Selenium.WebElement
- BaseURL = "https://finance.yahoo.com/quote/SPCE/options"
- Set cd = New Selenium.ChromeDriver
- cd.Start
- cd.Get BaseURL
- 'cd.FindElementByCss("button").Click
- Set DateOption = cd.FindElementByCss("div > select[data-reactid='5']").AsSelect
- With DateOption
- Debug.Print .Options.Count
- Debug.Print .Options.First.Text
- Debug.Print .Options.Last.Text
- Debug.Print .Options(1).Text
- Set DateOptions = .Options.Text
- End With
- DateOptions.ToExcel Range("A1")
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement