Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion playwright/_impl/_js_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def serialize_value(value: Any, handles: List[JSHandle], depth: int) -> Any:
if depth > 100:
raise Error("Maximum argument depth exceeded")
if value is None:
return dict(v="undefined")
return dict(v="null")
if isinstance(value, float):
if value == float("inf"):
return dict(v="Infinity")
Expand Down
2 changes: 1 addition & 1 deletion tests/async/test_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def test_evaluate_return_complex_objects(page):

async def test_evaluate_accept_none_as_one_of_multiple_parameters(page):
result = await page.evaluate(
'({ a, b }) => Object.is(a, undefined) && Object.is(b, "foo")',
'({ a, b }) => Object.is(a, null) && Object.is(b, "foo")',
{"a": None, "b": "foo"},
)
assert result
Expand Down