Scraping to click button and download

i have problem, what is it error with illegal selector

library(XML)
library(rvest)
library(RSelenium)


appURL <- 'https://www.knowledgeleader.com/KnowledgeLeader/Registration.nsf/Authentication+Details!OpenForm&RedirectTo=/KnowledgeLeader/Content.nsf/Web+Content/Subscribe'
rsDriver(port = 4567L, browser = c("internet explorer"), version = "latest", chromever = "latest", geckover = "latest", iedrver = NULL, phantomver = "2.1.1", verbose = TRUE, check = TRUE)
rD <- rsDriver()
remDr <- rD[["client"]]
remDr$open()
remDr$navigate(appURL)
remDr$findElement("css","#Username")$sendKeysToElement(list("your id"))
remDr$findElement("css","#Password")$sendKeysToElement(list("your pass"))
remDr$findElement("css", ".ButtonREG")$clickElement()
Sys.sleep(20)

remDr$findElement("css","#view\3a _id1\3a _id4\3a _id42\3a ToolsTab")$clickElement()

sys.sleep(20)

remDr$findElement("css","#view\3a _id1\3a _id4\3a _id70\3a _id79\3a repeat1\3a 0\3a link4")$clickElement()

webpage <- read_html(appURL)
tools_data_html <- html_nodes(webpage,'#view\:_id1\:_id4\:_id42\:ToolsTab')
tools_data <- html_text(tools_data_html)
head(tools_data)

remDr$findElement("css","#view\3a _id1\3a _id4\3a _id70\3a inputRichTextDownload > p > a > img")$clickElement()

how to solve it ??

Honestly, it sounds like you are asking us what your problem is. Please provide a reproducible example reprex with your desired output and what errors you are getting.

You can check out this article if you need help creating your reprex:

thanks sir, but the problem is solved

If you've found a solution, please mark the question as solved, and, if helpful, it's nice to explain that solution so that others can look to it in the future.

Thanks.

1 Like