I wrote a loop to go check a bunch of links and take screenshots. I often need to do these in the thousands. The loop I created works well for about 500 links and then my browser closes and I get the following error:
Error: Summary: UnknownError
Detail: An unknown server-side error occurred while processing the command.
class: org.openqa.selenium.remote.UnreachableBrowserException
Is there a way to prevent this?
If not, how can I get R to run source code OpenBrowser.R if this happens?
Here is the script:
for(i in 1:nrow(URL)){
remDr1$navigate(URL$Link[i])
remDr1$setTimeout(type = "page load", milliseconds = 30000)
remDr1$screenshot(file = URL$file[i])
}
tryCatchorpurrr:safely