0

In web browsers it is possible to clear history.

How is it possible to clear history in firefox browser in RSelenium using R commands?

jdharrison
  • 30,085
  • 4
  • 77
  • 89
Teres
  • 73
  • 1
  • 8
  • http://stackoverflow.com/questions/16461472/how-to-clear-browser-cache-automatically-in-selenium-webdriver – Rishabh Oct 29 '16 at 09:58
  • @Rishabh thank you. I ckecked this but this is for the general selenium and I didn't find anything in documentation of R selenium – Teres Oct 29 '16 at 10:02
  • please check whether there is a possibility to run the browser in a custom profile? – Rishabh Oct 29 '16 at 10:10

1 Answers1

2

See Possible to disable firefox and chrome default caching?

In RSelenium and firefox you could pass as follows:

fprof <- makeFirefoxProfile(
  list(
    "browser.cache.disk.enable" = FALSE,
    "browser.cache.memory.enable" = FALSE,
    "browser.cache.offline.enable" = FALSE,
    "network.http.use-cache" = FALSE
  )
)
remDr <- remoteDriver(extraCapabilities = fprof)
remDr$open()
Community
  • 1
  • 1
jdharrison
  • 30,085
  • 4
  • 77
  • 89
  • If I try to run the function fprof I receive this error `Error: unexpected '=' in: " browser.cache.offline.enable = FALSE, network.http.use-cache ="` is there anything additional I should bare in mind? – foc Nov 23 '16 at 15:26
  • @foc good spot those names should be quoted. Have updated answer. – jdharrison Nov 23 '16 at 15:29
  • In the `makeFirefoxProfile` help document it notes: "Windows doesn't come with command-line zip capability. Installing rtools https://CRAN.R-project.org/bin/windows/Rtools/index.html is a straightforward way to gain this capability.". This maybe the issue. – jdharrison Nov 23 '16 at 16:06