is_enabled | R Documentation |
is_disabled()
checks that an element has the disabled
attribute set to
TRUE
, while is_enabled()
checks that it does not. Both functions throw an
error if the element does not exist in the DOM.
is_enabled(x)
is_disabled(x)
x |
A |
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.
A boolean value: TRUE or FALSE.
Other conditions:
has_attr()
,
has_css_property()
,
has_length()
,
has_name()
,
has_text()
,
is_present()
,
is_visible()
html <- "
<button></button>
<button disabled></button>
"
session <- minimal_selenider_session(html)
is_enabled(s("button")) # TRUE
is_disabled(ss("button")[[2]]) # TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.