How can we host shiny apps that uses Rselenium in shinyapps.io?

34 views
Skip to first unread message

Hello World!

unread,
Nov 22, 2023, 4:59:42 AM11/22/23
to Selenium Users

I want to host a shiny application which uses Rselenium for web scrapping. How can I host it on shinyapp.io?

Here is my code:

library(shiny) library(RSelenium) library(netstat) library(tidyverse) library(crayon) ui <- fluidPage( actionButton("btn", "Click Me!"), textOutput("txt"), ) server <- function(input, output, session) { observeEvent(input$btn, { #connect chrome driver client_server <- rsDriver( browser = "chrome", chromever = "119.0.5735.90", verbose = FALSE, port = free_port(), ) # connect remote driver to client driver <- client_server$client driver$maxWindowSize() driver$navigate("https://google.com") output$txt <- renderText("Clicked!") }) } shinyApp(ui, server)

I try to host it in shinyapps.io but it returns a big error. The error contains:

E: Package 'phantomjs' has no installation candidate## End Task Log ################################################################ Error: Unhandled Exception: Child Task 1355100025 failed: Error building image: Build exited with non-zero status: 100 Execution halted
Reply all
Reply to author
Forward
0 new messages