print.selenider_element | R Documentation |
Display an element or collection of elements by fetching the elements and displaying their HTML contents.
## S3 method for class 'selenider_element'
print(x, width = getOption("width"), ..., timeout = NULL)
## S3 method for class 'selenider_elements'
print(x, width = getOption("width"), ..., n = 20, timeout = NULL)
x |
A |
width |
The maximum width of the output. |
... |
Not used. |
timeout |
How long to wait for |
n |
The maximum number of elements to print. |
x
, invisibly.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.