is_present {selenider} | R Documentation |
Does an element exist?
Description
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 |
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.
Value
A boolean value: TRUE or FALSE.
See Also
Other conditions:
has_attr()
,
has_css_property()
,
has_length()
,
has_name()
,
has_text()
,
is_enabled()
,
is_visible()
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
[Package selenider version 0.4.0 Index]