| Crates.io | rustenium-macros |
| lib.rs | rustenium-macros |
| version | 0.1.1 |
| created_at | 2025-12-26 01:39:33.745551+00 |
| updated_at | 2025-12-26 01:57:11.927375+00 |
| description | Convenience macros for Rustenium (css! and xpath! selectors) |
| homepage | https://github.com/dashn9/rustenium |
| repository | https://github.com/dashn9/rustenium |
| max_upload_size | |
| id | 2005121 |
| size | 12,201 |
Convenience macros for Rustenium element selection.
This crate provides ergonomic macros for creating element locators:
css!() - Create CSS selector locatorsxpath!() - Create XPath selector locatorsAdd 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?;
This is an optional component of the Rustenium project. See the main Rustenium documentation for complete usage examples.
MIT