wrapper around clickElement() method to generate safe scraping code
click(using, value, name = NULL, new_page = FALSE, prev = NULL)
a character string defining 'RSelenium' clicking instructions that can be pasted into a scraping function.
character string specifying locator scheme to use to search elements. Available schemes: "class name", "css selector", "id", "name", "link text", "partial link text", "tag name", "xpath".
character string specifying the search target.
character string specifying the object name the RSelenium "wElement" class object should be saved to.
logical indicating if clickElement() action will result in a change in url.
a placeholder for the output of functions being piped into click(). Defaults to NULL and should not be altered.
if (FALSE) {
#navigate to wikipedia, click random article
parsel::go("https://www.wikipedia.org/") %>>%
parsel::click(using = "id", value = "'n-randompage'") %>>%
show()
}
Run the code above in your browser using DataLab