How can I save and load cookies with RSelenium?

Hi, guys!

I have been trying to use cookies in my webscraping, but I'm failing

rD <- RSelenium::rsDriver(browser = "chrome",
                          chromever = "108.0.5359.71",
                          port = netstat::free_port(),
                          verbose = FALSE)
remDr <- rD[["client"]]
remDr$navigate("https://google.com/")
remDr$maxWindowSize()

remDr$getAllCookies()

# list()

I'm getting only empty lists.

What can I do to save the cookies and then load it next time I open this page?

1 Like

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.