Why can't RSelenium click this button?

I am trying to automate site browsing using RSelenium to get the latest scheduled release dates. My problem is the tooltip appears when I visit the url. The page (age-check-page) consists of two buttons that I was unable to click through RSelenium. The code I am using so far is below, what is the solution to this problem?

#Varialble and URL
s4 <- "https://www.systembolaget.se"

#Start Server
rd <- rsDriver()
remDr <- rd[["client"]]

#Load Page
remDr$navigate(s4)
webE <- remDr$findElements("class name", "action")
webE$isElementEnabled()
webE$clickElement()

      

+3


source to share


1 answer


You need to fine tune the selector:



#Varialble and URL
s4 <- "https://www.systembolaget.se"

#Start Server
rd <- rsDriver()
remDr <- rd[["client"]]

#Load Page
remDr$navigate(s4)
webE <- remDr$findElement("css", "#modal-agecheck .action.primary")
webE$clickElement()

      

+2


source







All Articles