Skip to content

Commit 32614cf

Browse files
committed
Add warning in browser.py:create_session()
1 parent ec0957d commit 32614cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

devtools/browser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,12 @@ async def create_session(self):
180180
raise RuntimeError(
181181
"There is no eventloop, or was not passed to browser. Cannot use async methods"
182182
)
183+
warnings.warn(
184+
"This method only works with some versions of Chrome, it is experimental"
185+
)
183186
response = await self.browser.send_command(
184-
"Target.attachToBrowserTarget", params=dict(targetId=self.target_id, flatten=True)
187+
"Target.attachToBrowserTarget",
188+
params=dict(targetId=self.target_id, flatten=True),
185189
)
186190
if "error" in response:
187191
raise RuntimeError("Could not create session") from Exception(

0 commit comments

Comments
 (0)