@@ -386,6 +386,7 @@ def extract_styleguide(
386386 def screenshot (
387387 self ,
388388 * ,
389+ clear_popups : bool | Omit = omit ,
389390 color_scheme : Literal ["light" , "dark" ] | Omit = omit ,
390391 country : Literal [
391392 "ad" ,
@@ -617,6 +618,12 @@ def screenshot(
617618 Capture a screenshot of a website.
618619
619620 Args:
621+ clear_popups: Optional parameter for comprehensive popup cleanup. If 'true', the browser
622+ dismisses detected cookie/consent UI and clears other detected obstructive
623+ popups and overlays before capture. If 'false' or not provided, this parameter
624+ requests no cleanup; handleCookiePopup can still request cookie/consent handling
625+ independently.
626+
620627 color_scheme: Optional parameter to choose the site's visual theme in the screenshot. Use
621628 'light' or 'dark' when the site offers both appearances.
622629
@@ -692,6 +699,7 @@ def screenshot(
692699 timeout = timeout ,
693700 query = maybe_transform (
694701 {
702+ "clear_popups" : clear_popups ,
695703 "color_scheme" : color_scheme ,
696704 "country" : country ,
697705 "direct_url" : direct_url ,
@@ -2616,6 +2624,7 @@ async def extract_styleguide(
26162624 async def screenshot (
26172625 self ,
26182626 * ,
2627+ clear_popups : bool | Omit = omit ,
26192628 color_scheme : Literal ["light" , "dark" ] | Omit = omit ,
26202629 country : Literal [
26212630 "ad" ,
@@ -2847,6 +2856,12 @@ async def screenshot(
28472856 Capture a screenshot of a website.
28482857
28492858 Args:
2859+ clear_popups: Optional parameter for comprehensive popup cleanup. If 'true', the browser
2860+ dismisses detected cookie/consent UI and clears other detected obstructive
2861+ popups and overlays before capture. If 'false' or not provided, this parameter
2862+ requests no cleanup; handleCookiePopup can still request cookie/consent handling
2863+ independently.
2864+
28502865 color_scheme: Optional parameter to choose the site's visual theme in the screenshot. Use
28512866 'light' or 'dark' when the site offers both appearances.
28522867
@@ -2922,6 +2937,7 @@ async def screenshot(
29222937 timeout = timeout ,
29232938 query = await async_maybe_transform (
29242939 {
2940+ "clear_popups" : clear_popups ,
29252941 "color_scheme" : color_scheme ,
29262942 "country" : country ,
29272943 "direct_url" : direct_url ,
0 commit comments