Skip to contents

is_present() and is_in_dom() checks if an element is present on the page, while is_missing() and is_absent() checks the opposite.

Usage

is_present(x)

is_in_dom(x)

is_absent(x)

Arguments

x

A selenider_element object.

Value

A boolean value: TRUE or FALSE.

Details

These functions do not implement a retry mechanism, and only test a condition once. Use elem_expect() or elem_wait_until() to use these conditions in tests.

See also

Examples

html <- "
<p class='class1'></p>
"

session <- minimal_selenider_session(html)

is_present(s(".class1")) # TRUE

is_in_dom(s(".class2")) # FALSE

is_absent(s(".class2")) # TRUE