Skip to main content

get_attribute

Function get_attribute 

Source
pub async fn get_attribute(
    adapter: &dyn EngineAdapter,
    selector: &str,
    attribute: &str,
) -> Result<Option<String>, EngineError>
Expand description

Get an attribute value from an element.

§Arguments

  • adapter - The engine adapter to use
  • selector - The CSS selector for the element
  • attribute - The attribute name

§Returns

The attribute value, or None if not found