diff --git a/tools/webdriver/webdriver/bidi/transport.py b/tools/webdriver/webdriver/bidi/transport.py index 14b990f971d235..841b9d0933d138 100644 --- a/tools/webdriver/webdriver/bidi/transport.py +++ b/tools/webdriver/webdriver/bidi/transport.py @@ -39,7 +39,9 @@ def __init__(self, url: str, self.read_message_task: Optional[asyncio.Task[Any]] = None async def start(self) -> None: - self.connection = await websockets.connect(self.url) # type: ignore + # Default max_size of 1048576 bytes is too small for some messages. + # 128MB should be enough. + self.connection = await websockets.connect(self.url, max_size=128 * 1024 * 1024) # type: ignore self.read_message_task = self.loop.create_task(self.read_messages()) for msg in self.send_buf: