I'm trying to scrape all the providers from this page: https://www.agedcareguide.com.au/nursing-homes/providers/vic
I'm using RSelenium on my Mac by running the following code in Terminal with Docker:
docker run -d -p 4445:4444 selenium/standalone-firefox
Then when I return to RStudio and run the following:
remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4445L,
browserName = "firefox")
remDr$open()
remDr$navigate("https://www.agedcareguide.com.au/nursing-homes/providers/vic")
remDr$getTitle()
All is good.
Then I try to get the element by using:
provs <- remDr$findElement()
and inside the brackets I have used the XPath, CSS Selector, everything I can think of but it always comes up saying:
Error in match.arg(using) : 'arg' should be one of “xpath”, “css selector”, “id”, “name”, “tag name”, “class name”, “link text”, “partial link text”
Anybody got any ideas where I'm going so terribly wrong?
provs <- remDr$findElement(using="class",value="c-result-list"). Note that this only finds the element, it does not get it without a bit of further processing. An alternative would be to usepage <- remDr$getPageSource()after yournavigateline, and then uservestor similar to extract what you want frompage.