Skip to content

Commit 05ce9bc

Browse files
committed
Revert accidental removal of API wrapping
1 parent ba40171 commit 05ce9bc

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

playwright/_impl/_connection.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,17 @@ async def send(self, method: str, params: Dict = None) -> Any:
6464
)
6565

6666
async def send_return_as_dict(self, method: str, params: Dict = None) -> Any:
67-
return await self._inner_send(method, params, True)
67+
return await self._connection.wrap_api_call(
68+
lambda: self._inner_send(method, params, True),
69+
self._is_internal_type,
70+
)
6871

6972
def send_no_reply(self, method: str, params: Dict = None) -> None:
7073
# No reply messages are used to e.g. waitForEventInfo(after).
71-
self._connection._send_message_to_server(
72-
self._object, method, {} if params is None else params, True
74+
self._connection.wrap_api_call_sync(
75+
lambda: self._connection._send_message_to_server(
76+
self._object, method, {} if params is None else params, True
77+
)
7378
)
7479

7580
async def _inner_send(

playwright/_impl/_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ async def set_content(
444444
waitUntil: DocumentLoadState = None,
445445
) -> None:
446446
await self._channel.send(
447-
"setContent", self._locals_to_params_with_timeout(locals())
447+
"setContent", self._locals_to_params_with_navigation_timeout(locals())
448448
)
449449

450450
@property

playwright/_impl/_page.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,13 +397,9 @@ def frames(self) -> List[Frame]:
397397

398398
def set_default_navigation_timeout(self, timeout: float) -> None:
399399
self._timeout_settings.set_default_navigation_timeout(timeout)
400-
self._channel.send_no_reply(
401-
"setDefaultNavigationTimeoutNoReply", dict(timeout=timeout)
402-
)
403400

404401
def set_default_timeout(self, timeout: float) -> None:
405402
self._timeout_settings.set_default_timeout(timeout)
406-
self._channel.send_no_reply("setDefaultTimeoutNoReply", dict(timeout=timeout))
407403

408404
async def query_selector(
409405
self,

0 commit comments

Comments
 (0)