I am trying to scrape for each country its table with all HIV/AIDS related NGOs using this link: https://www.unodc.org/ngo/showExtendedSearch.do
I am able to navigate towards the url and select the 'HIV/AIDS' radio button. But now I also need to extract for both the dropboxes 'region' and 'country' all the values so that I can use them inside a loop to sequentially webscrape the table for each country. How can I collect the values for both dropboxes? My code so far is below:
#load library
library(RSelenium)
#Specify remote driver
remDr <- remoteDriver(browserName='firefox')
#Initialise session
remDr$open()
#navigate to advanced search page
url <- "https://www.unodc.org/ngo/showExtendedSearch.do"
remDr$navigate(url)
#Click 'HIV/AIDS' filter
webElem <- remDr$findElement(using = 'css',
value = '#applicationArea > form > table > tbody > tr > td > table:nth-child(7) > tbody > tr:nth-child(2) > td > table > tbody > tr > td:nth-child(2) > table > tbody > tr:nth-child(3) > td:nth-child(4) > input[type="checkbox"]')
webElem$clickElement()