Retrieve crow_screenshot_args
attribute with screenshot settings
Source: R/module2app.R
get_screenshot_args_attr.Rd
An app may require special settings for a good screenshot.
For example, you would usually only be interested in the Module UI
part of apps created by module2app()
.
module2app()
supports this by setting the correct DOM selector
and exposing it via the crow_screenshot_args
.
Arguments
- appDir
The application to run. Should be one of the following:
A directory containing
server.R
, plus, eitherui.R
or awww
directory that contains the fileindex.html
.A directory containing
app.R
.An
.R
file containing a Shiny application, ending with an expression that produces a Shiny app object.A list with
ui
andserver
components.A Shiny app object created by
shinyApp()
.
Value
A list for the screenshot_args
argument
of shinytest2::AppDriver
's $new()
method.
If no attribute is found,
returns rlang::missing_arg()
, to keep shinytest2
defaults intact.
Details
The crow_screenshot_args
attribute can be set on whatever
object you pass to appDir
.
It should be a list passable to the screenshot_args
argument
of shinytest2::AppDriver
's $new()
method.
You can set all sorts of screenshot behavior that way,
but same of these settings may break functionality in crow.
It is known to work for DOM selection.
See also
Other modules:
abort_if_reactive()
,
mixed_react_tree
,
module2app()
Other screenshot:
examples_app()
,
get_screenshot_from_app()
,
get_screenshot_from_snaps
,
glue_regexp_snaps()
,
tag_shiny