@@ -580,13 +580,16 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
580580 headless = False
581581 headed = None
582582 xvfb = None
583+ xvfb_metrics = None
583584 binary_location = None
584585 if hasattr (sb_config , "headless" ):
585586 headless = sb_config .headless
586587 if hasattr (sb_config , "headed" ):
587588 headed = sb_config .headed
588589 if hasattr (sb_config , "xvfb" ):
589590 xvfb = sb_config .xvfb
591+ if hasattr (sb_config , "xvfb_metrics" ):
592+ xvfb_metrics = sb_config .xvfb_metrics
590593 if hasattr (sb_config , "binary_location" ):
591594 binary_location = sb_config .binary_location
592595
@@ -599,6 +602,7 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
599602 headless = headless ,
600603 headed = headed ,
601604 xvfb = xvfb ,
605+ xvfb_metrics = xvfb_metrics ,
602606 browser_executable_path = binary_location ,
603607 )
604608 )
@@ -963,6 +967,11 @@ def __install_pyautogui_if_missing():
963967 backend = "xvfb" ,
964968 use_xauth = True ,
965969 )
970+ if "--debug-display" in sys .argv :
971+ print (
972+ "Starting VDisplay from browser_launcher: (%s, %s)"
973+ % (xvfb_width , xvfb_height )
974+ )
966975 _xvfb_display .start ()
967976 sb_config ._virtual_display = _xvfb_display
968977 sb_config .headless_active = True
0 commit comments