Puppeteer in a different language - this R package provides a puppeteer inspired interface to the Chrome Devtools Protocol using chromote.
remotes::install_github("rstudio/chromote")
remotes::install_github("rundel/hayalbaz")
library(hayalbaz)
test = puppet$new("https://example.com")
test$get_element("p")
test$click("a")
test$view()