Skip to main content

Module selectors

Module selectors 

Source
Expand description

CSS selector utilities.

This module provides utilities for working with CSS selectors, including parsing, normalization, and text-based selector support.

Enums§

ParsedSelector
Represents a parsed selector.

Functions§

build_text_selector
Build a CSS selector to find elements by visible text.
escape_selector_value
Escape special characters in a CSS selector value.
extract_text_from_selector
Extract the text from a text selector.
has_nth_of_type
Check if a selector contains an nth-of-type modifier.
is_text_selector
Check if a selector is a text-based selector.
normalize_selector
Normalize a selector for consistent handling.
parse_nth_of_type
Parse an nth-of-type selector into its base selector and index.