A.
rvest
解决方案如下:
require(rvest)
your_xpath = "YOUR XPATH"
doc <- read_html(remDr$getPageSource()[[1]])
children <- doc %>% html_node(xpath=your_xpath) %>% html_children()
for (i in 1:length(children)){
webElem <- remDr$findElement(using = 'xpath', sprintf("%s/*[%d]", your_xpath, i))
if(classify_node(children[i]) == "click"){
webElem$$clickElement()
} else {...}
}