"""
This type stub file was generated by pyright.
"""

from typing import Any
from pyppeteer.connection import CDPSession

"""Tracing module."""
class Tracing:
    """Tracing class.

    You can use :meth:`start` and :meth:`stop` to create a trace file which can
    be opened in Chrome DevTools or
    `timeline viewer <https://chromedevtools.github.io/timeline-viewer/>`_.

    .. code::

        await page.tracing.start({'path': 'trace.json'})
        await page.goto('https://www.google.com')
        await page.tracing.stop()
    """
    def __init__(self, client: CDPSession) -> None:
        ...
    
    async def start(self, options: Dict[str, Any] = ..., **kwargs: Any) -> None:
        """Start tracing.

        Only one trace can be active at a time per browser.

        This method accepts the following options:

        * ``path`` (str): A path to write the trace file to.
        * ``screenshots`` (bool): Capture screenshots in the trace.
        * ``categories`` (List[str]): Specify custom categories to use instead
          of default.
        """
        ...
    
    async def stop(self) -> str:
        """Stop tracing.

        :return: trace data as string.
        """
        ...
    


