vignettes/simple-app/tests/testthat/test-shinytest2.R

library(shinytest2)

test_that("{shinytest2} recording: simple-app", {
  app <- AppDriver$new(name = "simple-app", height = 407, width = 348)
  app$set_inputs(name = "Hadley")
  app$click("greet")
  app$expect_values()
})

Try the shinytest2 package in your browser

Any scripts or data that you put into this service are public.

shinytest2 documentation built on June 24, 2024, 5:16 p.m.