rustenium-macros

Crates.iorustenium-macros
lib.rsrustenium-macros
version0.1.1
created_at2025-12-26 01:39:33.745551+00
updated_at2025-12-26 01:57:11.927375+00
descriptionConvenience macros for Rustenium (css! and xpath! selectors)
homepagehttps://github.com/dashn9/rustenium
repositoryhttps://github.com/dashn9/rustenium
max_upload_size
id2005121
size12,201
Daniel Shogbon (dashn9)

documentation

https://docs.rs/rustenium-macros

README

rustenium-macros

Convenience macros for Rustenium element selection.

This crate provides ergonomic macros for creating element locators:

  • css!() - Create CSS selector locators
  • xpath!() - Create XPath selector locators

Usage

Add to your Cargo.toml:

[dependencies]
rustenium = { version = "0.1", features = ["macros"] }

Then use in your code:

use rustenium::css;
use rustenium::xpath;

// CSS selector
let button = browser.find_element(css!("button.submit")).await?;

// XPath selector
let header = browser.find_element(xpath!("//h1[@class='title']")).await?;

Part of Rustenium

This is an optional component of the Rustenium project. See the main Rustenium documentation for complete usage examples.

License

MIT

Commit count: 229

cargo fmt