@@ -180,6 +180,7 @@ def screenshot(
180180 direct_url : str | Omit = omit ,
181181 domain : str | Omit = omit ,
182182 full_screenshot : Literal ["true" , "false" ] | Omit = omit ,
183+ handle_cookie_popup : Literal ["true" , "false" ] | Omit = omit ,
183184 max_age_ms : int | Omit = omit ,
184185 page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ] | Omit = omit ,
185186 timeout_ms : int | Omit = omit ,
@@ -208,6 +209,10 @@ def screenshot(
208209 screenshot capturing all content. If 'false' or not provided, takes a viewport
209210 screenshot (standard browser view).
210211
212+ handle_cookie_popup: Optional parameter to control cookie/consent popup handling. If 'true', we
213+ dismiss cookie banner before capture. If 'false' or not provided, captures the
214+ page without that step.
215+
211216 max_age_ms: Return a cached screenshot if a prior screenshot for the same parameters exists
212217 and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
213218 omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
@@ -248,6 +253,7 @@ def screenshot(
248253 "direct_url" : direct_url ,
249254 "domain" : domain ,
250255 "full_screenshot" : full_screenshot ,
256+ "handle_cookie_popup" : handle_cookie_popup ,
251257 "max_age_ms" : max_age_ms ,
252258 "page" : page ,
253259 "timeout_ms" : timeout_ms ,
@@ -790,6 +796,7 @@ async def screenshot(
790796 direct_url : str | Omit = omit ,
791797 domain : str | Omit = omit ,
792798 full_screenshot : Literal ["true" , "false" ] | Omit = omit ,
799+ handle_cookie_popup : Literal ["true" , "false" ] | Omit = omit ,
793800 max_age_ms : int | Omit = omit ,
794801 page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ] | Omit = omit ,
795802 timeout_ms : int | Omit = omit ,
@@ -818,6 +825,10 @@ async def screenshot(
818825 screenshot capturing all content. If 'false' or not provided, takes a viewport
819826 screenshot (standard browser view).
820827
828+ handle_cookie_popup: Optional parameter to control cookie/consent popup handling. If 'true', we
829+ dismiss cookie banner before capture. If 'false' or not provided, captures the
830+ page without that step.
831+
821832 max_age_ms: Return a cached screenshot if a prior screenshot for the same parameters exists
822833 and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
823834 omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
@@ -858,6 +869,7 @@ async def screenshot(
858869 "direct_url" : direct_url ,
859870 "domain" : domain ,
860871 "full_screenshot" : full_screenshot ,
872+ "handle_cookie_popup" : handle_cookie_popup ,
861873 "max_age_ms" : max_age_ms ,
862874 "page" : page ,
863875 "timeout_ms" : timeout_ms ,
0 commit comments