小编Ama*_*yan的帖子

是否可以在RStudio服务器上的ShinyApp中运行RSelenium?

我遇到了这样一个问题:我有使用RSelenium导航页面,单击按钮并收集数据的Rscript。我将此脚本作为功能包含在我的ShinyApp中。当我从机器上运行它时,一切都按预期进行:单击按钮后,Firefox启动并正确运行。

当我想在我公司的Rstudio服务器上(在Linux下)发布脚本以便通过链接提供对工具(在Windows下编写)的访问时,发生了麻烦。运行此命令后:

rD<-rsDriver(port=4441L, browser="firefox", chromever=NULL, iedrver = NULL, phantomver = NULL)
Run Code Online (Sandbox Code Playgroud)

A收到以下输出:

    $client
[1] "No sessionInfo. Client browser is mostly likely not opened."
$server
Process Handle
command   : /tmp/RtmpElIBko/file3a0241d505d8.sh 
system id : 15293
state     : exited
Run Code Online (Sandbox Code Playgroud)

因此服务器正在运行,但是无法打开浏览器

服务器日志为:

$stderr
 [1] "14:22:06.908 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.12.0', revision: '7c6e0b3'"                                                                                        
 [2] "14:22:06.910 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4441"                                                                                              
 [3] "2018-05-15 14:22:07.026:INFO::main: Logging initialized @452ms to org.seleniumhq.jetty9.util.log.StdErrLog"                                                                                     
 [4] "14:22:07.227 INFO [SeleniumServer.boot] - Selenium Server is …
Run Code Online (Sandbox Code Playgroud)

r shiny shiny-server rselenium

5
推荐指数
1
解决办法
265
查看次数

标签 统计

r ×1

rselenium ×1

shiny ×1

shiny-server ×1