elem_css_property {selenider}R Documentation

Get a CSS property of an element

Description

Get a CSS property of an element (e.g. "background-color"). Specifically, the computed style is returned, meaning that, for example, widths and heights will be returned in pixels, and colours will be returned as an RGB value.

Usage

elem_css_property(x, name, timeout = NULL)

Arguments

x

A selenider_element object.

name

The name of the CSS property to get.

timeout

The time to wait for x to exist.

Value

A string, or NULL if the property does not exist.

See Also

Other properties: elem_attr(), elem_name(), elem_size(), elem_text()

Examples


html <- "
<p style='visibility:hidden; color:red;'>Text</p>
"

session <- minimal_selenider_session(html)

s("p") |>
  elem_css_property("visibility")

s("p") |>
  elem_css_property("color")


[Package selenider version 0.4.0 Index]