Headless interaction

library(shinytest2)

app <- AppDriver$new(shinyApp(ui, server))

app$set_inputs(name = "Hadley")
app$get_value(output = "greeting")
#> [1] "Hi Hadley"

app$click("reset")
app$get_value(output = "greeting")
#> $message
#> [1] ""
#> 
#> $call
#> [1] "NULL"
#> 
#> $type
#> [1] "shiny.silent.error" "validation"