Findelements using RSelenim

I am trying to click on the Rising button on the web page "" using R Selenium

By inspecting the source code I found it to be of the class "_md-text" . So to find the elements associated with this class I wrote the following code.

rs <- rsDriver()
rsc <- rs$client

ele<- rsc$findElements(using = "css","._md-text")
res <- unlist(lapply(ele, function(x){x$getElementText()}))

The output I got was


The name "Rising" is not there in the list.

Can anyone please tell what is the error

The button for "Rising" is a custom widget, which would make it difficult to trigger all of the underlying elements simultaneously/in the correct order. (It is likely done this way to prevent web scrapping.)

Have you checked out the gtrendsR package? I haven't used it, but it might an easier solution than scrapping.

1 Like