I am trying to log in to this page: https://www.optionslam.com/accounts/login/ using the code on this post as a starting point, Scrape password-protected website in R
I
Two options:
Use findElements
to get both buttons and click on the 2nd one:
remDr$findElements("class name", "red-button")[[2]]$clickElement()
or use another selector method as @SymbolixAU suggests and target the 2nd element directly:
webElem <- remDr$findElement("css", ".red-button[value='Log in']")
webElem$getElementAttribute("outerHTML")
#[[1]]
#[1] ""
webElem$clearElement()