1414
1515from typing import Any , Dict , cast
1616
17+ from playwright ._impl ._artifact import Artifact
1718from playwright ._impl ._browser import Browser
1819from playwright ._impl ._browser_context import BrowserContext
1920from playwright ._impl ._browser_type import BrowserType
2223from playwright ._impl ._connection import ChannelOwner
2324from playwright ._impl ._console_message import ConsoleMessage
2425from playwright ._impl ._dialog import Dialog
25- from playwright ._impl ._download import Download
2626from playwright ._impl ._element_handle import ElementHandle
2727from playwright ._impl ._frame import Frame
2828from playwright ._impl ._js_handle import JSHandle
2929from playwright ._impl ._network import Request , Response , Route , WebSocket
3030from playwright ._impl ._page import BindingCall , Page , Worker
3131from playwright ._impl ._playwright import Playwright
3232from playwright ._impl ._selectors import Selectors
33+ from playwright ._impl ._stream import Stream
3334
3435
3536class DummyObject (ChannelOwner ):
@@ -42,6 +43,8 @@ def __init__(
4243def create_remote_object (
4344 parent : ChannelOwner , type : str , guid : str , initializer : Dict
4445) -> Any :
46+ if type == "Artifact" :
47+ return Artifact (parent , type , guid , initializer )
4548 if type == "BindingCall" :
4649 return BindingCall (parent , type , guid , initializer )
4750 if type == "Browser" :
@@ -63,8 +66,6 @@ def create_remote_object(
6366 return ConsoleMessage (parent , type , guid , initializer )
6467 if type == "Dialog" :
6568 return Dialog (parent , type , guid , initializer )
66- if type == "Download" :
67- return Download (parent , type , guid , initializer )
6869 if type == "ElementHandle" :
6970 return ElementHandle (parent , type , guid , initializer )
7071 if type == "Frame" :
@@ -81,6 +82,8 @@ def create_remote_object(
8182 return Response (parent , type , guid , initializer )
8283 if type == "Route" :
8384 return Route (parent , type , guid , initializer )
85+ if type == "Stream" :
86+ return Stream (parent , type , guid , initializer )
8487 if type == "WebSocket" :
8588 return WebSocket (parent , type , guid , initializer )
8689 if type == "Worker" :
0 commit comments