Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97808

Passing value of a variable in findElement function in RSelenium

$
0
0

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,


Viewing all articles
Browse latest Browse all 97808

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>