I am trying to bring all items in the webpage-for instance I would like to bring the first
"Hillebrand Boudewynsz. van der Aa (1661 - 1717)" and then all the other 49 in the page MY code is below, I am trying to use selenium and bring the items through xpath or CSS but I am not sure for the right path both options will be welcome this is the required sentence from the code #Finding element object<-remDr$findElement(using="xpath","/html/body/div[2]/div/ul/li[1]/a") #--------------------------------------------------------------------- and the website https://www.vondel.humanities.uva.nl/ecartico/persons/index.php?subtask=browse
rm(list=ls())
library(tidyverse)
#install.packages("robotstxt")
library( robotstxt)
#install.packages("RSelenium")
library(rvest)
library(RSelenium)
library(tidyverse)
#install.packages("netstat")
library(netstat)
library(wdman)
selenium()
# see path
selenium_object<-selenium(retcommand = T,check = F)
#binman::list_versions("chromedriver")
#start the server
remote_driver<-rsDriver(
browser = "chrome",
chromever = "113.0.5672.63",
verbose = F,
port = free_port()
)
# create a client object
remDr<-remote_driver$client
#open a browser
remDr$open()
# maximaize window size
remDr$maxWindowSize()
#navigate website
remDr$navigate("https://www.vondel.humanities.uva.nl/ecartico/persons/index.php?subtask=browse")
#Finding element
object<-remDr$findElement(using="xpath","/html/body/div[2]/div/ul/li[1]/a")
#---------------------------------------------------------------------