I want to know how can I pass a value that is given through a for function to the value parameter in findElement function of RSelenium package.
The code is the following:
option <- remDr$findElement(using = 'xpath', "//select[@id='mainContent_lbCcats']/option[@value='10']")
option$clickElement()
But instead I want the following, which does not work:
option <- remDr$findElement(using = 'xpath', "//select[@id='mainContent_lbCcats']/option[@value=var]")
option$clickElement()
How can I pass the value of a variable that changes through a loop in R?
Regards,