library(RSelenium)
driver = rsDriver(
port = 4857L,
browser = c("firefox"))
remDr <- driver[["client"]]
remDr$navigate("https://publicadministration.un.org/egovkb/en-us/Data-Center")
# Need to edit this line
remDr$findElement("xpath", "//select[@id='dnn_ctr633_Dispatch_Index_ddlYear']/option[@value='2018']")$clickElement()
remDr$findElement("id", "dnn_ctr633_Dispatch_Index_btnSubmit")$clickElement()
You need make click in year box and next select the specific year:
# with xpath
remDr$findElement("xpath", '//*[@id="dnn_ctr633_ModuleContent"]/div/div/div[1]/div[1]/div/button')$clickElement()
# select 2018
remDr$findElement("xpath", '//*[@id="Body"]/div[1]/ul/li[3]/label')$clickElement() # in [3] is for 2018.
# next you need put cilck in update bottom in the page for load the new filter.
remDr$findElement("xpath", '//*[@id="dnn_ctr633_Dispatch_Index_btnSubmit"]')$clickElement()