elem_size {selenider} | R Documentation |
Get the number of elements in a collection
Description
Get the number of elements in a HTML element collection, waiting for the parent elements (if any) to exist before returning a value.
length()
and elem_size()
can be used interchangeably, the only
difference being that elem_size()
allows you to specify a timeout.
Usage
elem_size(x, timeout = NULL)
## S3 method for class 'selenider_elements'
length(x)
Arguments
x |
A |
timeout |
The time to wait for the parent of |
Value
An integer representing the number of elements in the collection.
See Also
Other properties:
elem_attr()
,
elem_css_property()
,
elem_name()
,
elem_text()
Examples
html <- "
<div></div>
<div></div>
<div></div>
<div></div>
"
session <- minimal_selenider_session(html)
ss("div") |>
length()
[Package selenider version 0.4.0 Index]