File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -357,6 +357,8 @@ def normalize_launch_params(params: Dict) -> None:
357357 if params ["ignoreDefaultArgs" ] is True :
358358 params ["ignoreAllDefaultArgs" ] = True
359359 del params ["ignoreDefaultArgs" ]
360+ elif params ["ignoreDefaultArgs" ] is False :
361+ del params ["ignoreDefaultArgs" ]
360362 if "executablePath" in params :
361363 params ["executablePath" ] = str (Path (params ["executablePath" ]))
362364 if "downloadsPath" in params :
Original file line number Diff line number Diff line change @@ -107,3 +107,12 @@ async def test_browser_close_should_be_callable_twice(
107107 browser .close (),
108108 )
109109 await browser .close ()
110+
111+
112+ async def test_browser_type_launch_should_accept_ignore_default_args_false (
113+ browser_type : BrowserType , launch_arguments : Dict
114+ ) -> None :
115+ # Regression for https://github.com/microsoft/playwright-python/issues/3005:
116+ # passing False used to crash with "expected array, got boolean".
117+ browser = await browser_type .launch (** launch_arguments , ignore_default_args = False )
118+ await browser .close ()
Original file line number Diff line number Diff line change @@ -88,3 +88,10 @@ def test_browser_close_should_be_callable_twice(
8888 browser = browser_type .launch (** launch_arguments )
8989 browser .close ()
9090 browser .close ()
91+
92+
93+ def test_browser_type_launch_should_accept_ignore_default_args_false (
94+ browser_type : BrowserType , launch_arguments : Dict
95+ ) -> None :
96+ browser = browser_type .launch (** launch_arguments , ignore_default_args = False )
97+ browser .close ()
You can’t perform that action at this time.
0 commit comments