Skip to content

Commit 782f683

Browse files
authored
(very) simple bug fix for screenshot method (#106)
* simple bug fix for screenshot method unpack the input options as the base playwright screenshot method accepts keyword arguments only * bug fix for the bug fix - send the safe payload instead of options options might be None.
1 parent 7a3e23e commit 782f683

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stagehand/page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ async def screenshot(self, options: Optional[dict] = None) -> str:
399399

400400
return result
401401
else:
402-
return await self._page.screenshot(options)
402+
return await self._page.screenshot(**payload)
403403

404404
# Method to get or initialize the persistent CDP client
405405
async def get_cdp_client(self) -> CDPSession:

0 commit comments

Comments
 (0)