if (FALSE) {
#navigate to wikipedia, type "Hello" into the search box,
#press enter, get page header
parsel::go("https://www.wikipedia.org/") %>>%
parsel::type(using = "id",
value = "'searchInput'",
name = "searchbox",
text = c("Hello","\uE007")) %>>%
parsel::get_element(using = "id",
value = "'firstHeading'",
name = "header") %>>%
show()
#navigate to wikipedia, type "Hello" into the search box, press enter,
#get page header, save in external data.frame x.
parsel::go("https://www.wikipedia.org/") %>>%
parsel::type(using = "id",
value = "'searchInput'",
name = "searchbox",
text = c("Hello","\uE007")) %>>%
parsel::get_element(using = "id",
value = "'firstHeading'",
name = "x[,1]") %>>%
show()
}
Run the code above in your browser using DataLab