无法在服务器功能内运行ShinyDriver

时间:2020-03-01 17:15:38

标签: shiny

我无法在服务器文件中运行ShinyDriver。基本上,我有一个简单的应用程序,想检查actionbutton是否正常工作。因此,我无法运行ShinyDriver函数。下面是示例

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")

})

0 个答案:

没有答案