I'm trying to get a particular field Further Information
out of a table from a webpage using vba selenium bindings. I got success when I tried with python in combination with selenium using textContent
instead of text
as the latter is scraping nothing. However, the problem is I can't make use of this textContent
within vba selenium. This is the link to my earlier post where I've asked this same question tagging different language.
I've tried with:
Sub ScrapeContent()
Const URL$ = "https://www.sharedividends.com.au/mlt-dividend-history/"
Dim driver As New ChromeDriver, elem As Object, R&
driver.get URL
For Each elem In driver.FindElementsByXPath("//*[@id='divTable']//tbody//tr[@role='row']", timeout:=10000)
R = R + 1: Cells(R, 1) = elem.FindElementByXPath("(.//td)[8]").Text
Next elem
End Sub
The field that I'm interested in:
When I run my above script, It fetches nothing. It doesn't throw any error either. FYI, the xpaths I've defined within the script is accurate.
How can I get that particular field (available in every row) out of the table from that website?