selectors.xpath.api

class LXMLXpathApi(selector: Any)[source]

Bases: SelectionApi

Interface for lxml xpath API for html elements.

__init__(selector: Any) 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 SeleniumXPathApi(selector: Any)[source]

Bases: SelectionApi

Interface for selenium xpath 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 PlaywrightXPathApi(selector: Any)[source]

Bases: SelectionApi

Interface for playwright xpath 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.