Not able to run shinyDriver inside server function

Hi all,

I am not able to run shinyDriver inside server file. Basically, I am have a simple application and want to check the actionbutton is working or not. So, I am not able to run shinyDriver function. Below is the sample

ui.R

library(shiny)
source("add.R")


# Define UI for application that draws a histogram
shinyUI(fluidPage(
  
  textInput("name", "Name: "),
  textOutput("greeting"),
  actionButton("show", "Show"),
  actionButton("checkme","checkme"),
  selectInput("Slider","Slider",choices = unique(iris$Species))
  )
  )

server.R

library(shinytest)
library(testthat)

shinyServer(function(input, output) {
  
  output$greeting <- renderText({
    paste0("Hello, ", input$name, "!")
  })
  app <- ShinyDriver$new(getwd())
  Checking_click_button <- app$setInputs(checkme = "click")
  
})

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.