elem_equal | R Documentation |
Checks if two selenider_element
objects point to the
same element on the page. elem_equal()
is equivalent to
using ==
, but allows you to specify a timeout value if
needed.
elem_equal(x, y, timeout = NULL)
## S3 method for class 'selenider_element'
e1 == e2
x , y , e1 , e2 |
|
timeout |
How long to wait for the elements to be present. |
TRUE
or FALSE
.
elem_filter()
and elem_find()
for filtering collection of elements.
html <- "
<div></div>
<div class='second'>
<p></p>
</div>
"
session <- minimal_selenider_session(html)
s("div") == ss("div")[[1]]
has_p_child <- function(x) {
x |>
elem_children() |> # Direct children
elem_filter(has_name("p")) |>
has_at_least(1)
}
ss("div") |>
elem_find(has_p_child) |>
elem_equal(s(".second")) # TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.