selectors.css.api

class SoupsieveApi(selector)[source]

Bases: SelectionApi

Interface for soupsieve css API for soup.

__init__(selector) None[source]

Initializes SelectionApi with given selector.

Parameters

selectorAny

The selector used for locating elements.

select(element: IElement) list[IElement][source]

Selects elements within a given node that match the selector.

Parameters

elementIElement

The element to search within.

Returns

list[IElement]

A list of elements matching the selector within the provided element.

class CSSSelectApi(selector)[source]

Bases: SelectionApi

Interface for cssselect css API for lxml.

__init__(selector) None[source]

Initializes SelectionApi with given selector.

Parameters

selectorAny

The selector used for locating elements.

select(element: IElement) list[IElement][source]

Selects elements within a given node that match the selector.

Parameters

elementIElement

The element to search within.

Returns

list[IElement]

A list of elements matching the selector within the provided element.

class SeleniumCSSApi(selector: Any)[source]

Bases: SelectionApi

Interface for selenium css API for web elements.

select(element: IElement) list[IElement][source]

Selects elements within a given node that match the selector.

Parameters

elementIElement

The element to search within.

Returns

list[IElement]

A list of elements matching the selector within the provided element.

class PlaywrightCSSApi(selector: Any)[source]

Bases: SelectionApi

Interface for playwright css API for web elements.

select(element: IElement) list[IElement][source]

Selects elements within a given node that match the selector.

Parameters

elementIElement

The element to search within.

Returns

list[IElement]

A list of elements matching the selector within the provided element.