Skip to contents

Display an element or collection of elements by fetching the elements and displaying their HTML contents.

Usage

# S3 method for selenider_element
print(x, width = getOption("width"), ..., timeout = NULL)

# S3 method for selenider_elements
print(x, width = getOption("width"), ..., n = 20, timeout = NULL)

Arguments

x

A selenider_element or selenider_elements object.

width

The maximum width of the output.

...

Not used.

timeout

How long to wait for x to exist in order to print its HTML.

n

The maximum number of elements to print.

Value

x, invisibly.

Examples

html <- "
<div>
<p>Text 1</p>
<p>Text 2</p>
<p>Text 3</p>
<p>Text 4</p>
</div>
"

session <- minimal_selenider_session(html)

print(s("div"))

print(ss("p"))

print(ss("p"), n = 3)