chrome/test/enterprise/e2e/infra/test_util.py
def create_chrome_webdriver(chrome_options=None, incognito=False, prefs=None):
  """Configures and returns a Chrome WebDriver object."

  Args:
    chrome_options: The default ChromeOptions to use.
    incognito: Whether or not to launch Chrome in incognito mode.
    prefs: Profile preferences. None for defaults.
  """
  if chrome_options == None:
    chrome_options = Options()

  if incognito:
    chrome_options.add_argument('incognito')

  if prefs != None:
    chrome_options.add_experimental_option("prefs", prefs)

  os.environ["CHROME_LOG_FILE"] = r"c:\temp\chrome_log.txt"

  return webdriver.Chrome(
      executable_path=r"C:\temp\chromedriver.exe",
      service_args=["--verbose", r"--log-path=c:\temp\chromedriver.log"],
      chrome_options=chrome_options)
Configures and returns a Chrome WebDriver object."

  Args:
    chrome_options: The default ChromeOptions to use.
    incognito: Whether or not to launch Chrome in incognito mode.
    prefs: Profile preferences. None for defaults.
  
Configures and returns a Chrome WebDriver object."
Configures and returns a Chrome WebDriver object . "
def create_chrome_webdriver(chrome_options=None, incognito=False, prefs=None):
  if chrome_options == None:
    chrome_options = Options()
  if incognito:
    chrome_options.add_argument('incognito')
  if prefs != None:
    chrome_options.add_experimental_option("prefs", prefs)
  os.environ["CHROME_LOG_FILE"] = r"c:\temp\chrome_log.txt"
  return webdriver.Chrome(
      executable_path=r"C:\temp\chromedriver.exe",
      service_args=["--verbose", r"--log-path=c:\temp\chromedriver.log"],
      chrome_options=chrome_options)
def create_chrome_webdriver ( chrome_options = None , incognito = False , prefs = None ) : if chrome_options == None : chrome_options = Options ( ) if incognito : chrome_options . add_argument ( 'incognito' ) if prefs != None : chrome_options . add_experimental_option ( "prefs" , prefs ) os . environ [ "CHROME_LOG_FILE" ] = r"c:\temp\chrome_log.txt" return webdriver . Chrome ( executable_path = r"C:\temp\chromedriver.exe" , service_args = [ "--verbose" , r"--log-path=c:\temp\chromedriver.log" ] , chrome_options = chrome_options )
Configures and returns a Chrome WebDriver object."
Configures and returns a Chrome WebDriver object . "
"""Configures and returns a Chrome WebDriver object."

  Args:
    chrome_options: The default ChromeOptions to use.
    incognito: Whether or not to launch Chrome in incognito mode.
    prefs: Profile preferences. None for defaults.
  """
chrome_options
The default ChromeOptions to use.
The default ChromeOptions to use .
incognito
Whether or not to launch Chrome in incognito mode.
Whether or not to launch Chrome in incognito mode .
prefs
Profile preferences. None for defaults.
Profile preferences . None for defaults .