My code below sends a request to a Japanese geolocation website, and gets a new page, but I can't get RSelenium to locate and click on the link.
library(XML)
library(RSelenium)
remDr <- remoteDriver(
remoteServerAddr = "localhost",
port = 4445L,
browserName = "firefox"
)
remDr$open()
remDr$navigate("https://maps.gsi.go.jp")
remDr$screenshot(display = TRUE)
remDr$getCurrentUrl()
webElem <- remDr$findElement(using = "id", value = "query")
webElem$getElementAttribute("id")
webElem$highlightElement()
webElem$sendKeysToElement(list("茨城県行方郡玉造町","\uE007"))
remDr$screenshot(display = TRUE)
I want to click on the node below and get the URL from the new page, but none of my attempts with remDr$findElement
are working. Am I missing something obvious?
<a href="javascript:void(0);" style="padding-left: 32px; background: url("image/mapicon/search_result.png") 0px 50% no-repeat;"><div class="title">茨城県行方郡</div><div class="muni">茨城県行方市</div></a>