ddp_utils.browser.backends.native.models

import ddp_utils.browser.backends.native.models

Immutable models returned by the native browser backend.

class ddp_utils.browser.backends.native.models.NativeBrowserInstallation(product: BrowserProduct, executable: Path, source: str)

Bases: object

Describe one resolved system-browser installation.

Parameters

Name

Type

Description

product

BrowserProduct

Browser product represented by the executable.

executable

Path

Absolute executable path.

source

str

Discovery source such as explicit, path, or standard.

Examples

Preserve how a Chrome executable was found:

installation = NativeBrowserInstallation(
    product=BrowserProduct.CHROME,
    executable=Path("/usr/bin/google-chrome"),
    source="standard",
)
class ddp_utils.browser.backends.native.models.NativeProcessInfo(product: BrowserProduct, executable: Path, pid: int, command: tuple[str, ...], started_at: datetime)

Bases: object

Describe a browser process owned by a native session.

Parameters

Name

Type

Description

product

BrowserProduct

Launched browser product.

executable

Path

Absolute executable path.

pid

int

Operating-system process identifier.

command

tuple[str, ...]

Exact argument vector supplied to the operating system.

started_at

datetime

UTC process-launch time.

Examples

Record the process metadata exposed through session.native:

print(session.native.pid)