selenider_available | R Documentation |
Checks if selenider's dependencies are available, and that we are in an environment where it makes sense to open a selenider session.
skip_if_selenider_unavailable()
skips a testthat test if
selenider_available()
returns FALSE
.
selenider_available(session = c("chromote", "selenium"), online = TRUE)
skip_if_selenider_unavailable(session = c("chromote", "selenium"))
session |
Which session we should check. |
online |
Whether we need to check for an internet connection. |
Specifically, the following is checked:
The SELENIDER_AVAILABLE
environment variable. Set this to "TRUE"
or
"FALSE"
to override the return value of this function.
Whether we are on CRAN (using the NOT_CRAN
environment variable). If we
are, the function returns FALSE
.
Whether an internet connection is available (using curl::nslookup()
).
If session
is "chromote"
, we also check:
Whether chromote
is installed.
Whether chromote::find_chrome()
does not error.
If session
is "selenium"
, we check:
Whether selenium
is installed.
Whether we can find a valid browser that is supported by selenium
.
A boolean flag: TRUE
or FALSE
.
selenider_available()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.