read_html.selenider_session {selenider} | R Documentation |
Read a live HTML document
Description
xml2::read_html()
can be used on a selenider session to read the HTML of
the entire page, or on a selenider element to get the HTML of that element.
Usage
read_html.selenider_session(
x,
encoding = "",
...,
options = c("RECOVER", "NOERROR", "NOBLANKS")
)
read_html.selenider_element(
x,
encoding = "",
timeout = NULL,
outer = TRUE,
...,
options = c("RECOVER", "NOERROR", "NOBLANKS")
)
Arguments
x |
A |
encoding , ... , options |
Passed into |
timeout |
How long to wait for |
outer |
Whether to read the inner (all children of the current element)
or outer (including the element itself) HTML of |
Value
read_html()
returns an XML document. Note that HTML will always be wrapped
in a <html>
and <body>
tag, if it isn't already.
Examples
library(rvest)
html <- "
<div>
<p>Example text</p>
</div>
"
session <- minimal_selenider_session(html)
read_html(session)
read_html(s("div"))
[Package selenider version 0.4.0 Index]