Skip to content

Web Extension

The web extension module installs and uninstalls browser extensions.

Methods

install

Install a browser extension from an archive file:

result = await client.web_extension.install("/path/to/extension.zip")
print(result.extension)  # extension ID

uninstall

Uninstall a previously installed extension:

await client.web_extension.uninstall("extension-id")

Reference

WebExtensionModule

Module for managing browser extensions.

Commands
  • install — install a web extension from an archive path
  • uninstall — uninstall a previously installed extension
Example

result = await client.web_extension.install("/path/to/extension.zip") await client.web_extension.uninstall(result.extension)

Source code in bidiwave/modules/webextension.py
class WebExtensionModule:
    """Module for managing browser extensions.

    Commands:
        - install — install a web extension from an archive path
        - uninstall — uninstall a previously installed extension

    Example:
        result = await client.web_extension.install("/path/to/extension.zip")
        await client.web_extension.uninstall(result.extension)
    """

    def __init__(self, connection: Connection) -> None:
        self._connection = connection

    async def install(self, archive_path: str) -> WebExtensionInfo:
        """Installs a web extension from an archive file.

        Args:
            archive_path: File system path to the extension archive
                (e.g. .zip or .crx file).

        Returns:
            WebExtensionInfo with the extension ID.
        """
        result = await self._connection.send_command(
            WEB_EXTENSION_INSTALL, {"archivePath": archive_path}
        )
        return WebExtensionInfo.model_validate(result)

    async def uninstall(self, extension: str) -> None:
        """Uninstalls a previously installed web extension.

        Args:
            extension: ID of the extension to uninstall.
        """
        await self._connection.send_command(
            WEB_EXTENSION_UNINSTALL, {"extension": extension}
        )

install async

install(archive_path: str) -> WebExtensionInfo

Installs a web extension from an archive file.

Parameters:

Name Type Description Default
archive_path str

File system path to the extension archive (e.g. .zip or .crx file).

required

Returns:

Type Description
WebExtensionInfo

WebExtensionInfo with the extension ID.

Source code in bidiwave/modules/webextension.py
async def install(self, archive_path: str) -> WebExtensionInfo:
    """Installs a web extension from an archive file.

    Args:
        archive_path: File system path to the extension archive
            (e.g. .zip or .crx file).

    Returns:
        WebExtensionInfo with the extension ID.
    """
    result = await self._connection.send_command(
        WEB_EXTENSION_INSTALL, {"archivePath": archive_path}
    )
    return WebExtensionInfo.model_validate(result)

uninstall async

uninstall(extension: str) -> None

Uninstalls a previously installed web extension.

Parameters:

Name Type Description Default
extension str

ID of the extension to uninstall.

required
Source code in bidiwave/modules/webextension.py
async def uninstall(self, extension: str) -> None:
    """Uninstalls a previously installed web extension.

    Args:
        extension: ID of the extension to uninstall.
    """
    await self._connection.send_command(
        WEB_EXTENSION_UNINSTALL, {"extension": extension}
    )