DriverWrapperSessions Interface

Note

This is auto-generated interface documentation for the actual signature of DriverWrapperSessions class.

DriverWrapperSessions manages all active DriverWrapper instances, providing centralized session tracking and management. It ensures efficient handling of multiple driver instances by maintaining a registry of active sessions and facilitating their retrieval or removal. This centralization aids in resource management and simplifies the coordination of test execution across various drivers.


class mops.base.driver_wrapper.DriverWrapperSessions[source]
all_sessions: ClassVar[list[mops.base.driver_wrapper.DriverWrapper]] = []
classmethod add_session(driver_wrapper: DriverWrapper) None[source]

Add a DriverWrapper object to the session pool.

Parameters:

driver_wrapper – The DriverWrapper instance to add to the pool.

Returns:

None

classmethod remove_session(driver_wrapper: DriverWrapper) None[source]

Remove a DriverWrapper object from the session pool.

Parameters:

driver_wrapper – The DriverWrapper instance to remove from the pool.

Returns:

None

classmethod sessions_count() int[source]

Get the count of initialized DriverWrapper objects.

Returns:

int - The number of initialized sessions.

classmethod first_session() DriverWrapper | None[source]

Get the first DriverWrapper object from the session pool.

Returns:

The first DriverWrapper object in the pool, or None if no session exists.

Return type:

Union[DriverWrapper, None]

classmethod is_connected() bool[source]

Check the connection status of any DriverWrapper object in the pool.

Returns:

bool - True if at least one DriverWrapper object is available, otherwise False.