admin管理员组文章数量:1352788
I am using a selenium/standalone-firefox docker container that I have installed R into. The aim is to set up a daily scrape of a webpage using GCS. I have an R selenium script that runs well locally. However when I try and run it in the container I cannot connect to the selenium server. I have checked the seleneium server is running and firefox is available.
I have been using this code to try and make the connection using R inside the container:
remDr <- remoteDriver(
remoteServerAddr = "localhost",
port = 4444L,
browserName = "firefox",
version = "latest")
remDr$open()
And this is the output:
[1] "Connecting to remote server"
$id
[1] NA
I have tried various other options I found on the internet but none have worked. I've also tried using a headless option with no success. When I run the script locally I have been using :
rD <- rsDriver(browser = "firefox", port = 4444L, verbose = TRUE, chromever = NULL, extraCapabilities = capabilities)
remDr <- rD[["client"]]!
Which works fine locally but not within the container. I think because the server is already running.
Can anyone help? I've been going around in circles for ages on this!
Thanks
本文标签:
版权声明:本文标题:Using R Selenium inside a seleniumstandalone-firefox Docker container. Connecting to the server - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743920490a2561998.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论