chrome/test/chromedriver/log_replay/client_replay.py
def _GetAnyElementIds(payload):
  """Looks for any element, session, or window IDs, and returns them.

  Payload should be passed as a dict or list.

  Args:
    payload: payload to check for IDs, as a python list or dict.
  Returns:
    list of ID strings, in order, in this payload
  """
  element_tag="element-6066-11e4-a52e-4f735466cecf"
  if isinstance(payload, dict):
    if element_tag in payload:
      return [payload[element_tag]]
  elif isinstance(payload, list):
    elements = [item[element_tag] for item in payload if element_tag in item]
    windows = [item for item in payload if "CDwindow" in item]
    if not elements and not windows:
      return None

    return elements + windows

  return None
Looks for any element, session, or window IDs, and returns them.

  Payload should be passed as a dict or list.

  Args:
    payload: payload to check for IDs, as a python list or dict.
  Returns:
    list of ID strings, in order, in this payload
  
Looks for any element, session, or window IDs, and returns them.
Payload should be passed as a dict or list.
Looks for any element session or window IDs and returns them . Payload should be passed as a dict or list .
def _GetAnyElementIds(payload):
  element_tag="element-6066-11e4-a52e-4f735466cecf"
  if isinstance(payload, dict):
    if element_tag in payload:
      return [payload[element_tag]]
  elif isinstance(payload, list):
    elements = [item[element_tag] for item in payload if element_tag in item]
    windows = [item for item in payload if "CDwindow" in item]
    if not elements and not windows:
      return None
    return elements + windows
  return None
def _GetAnyElementIds ( payload ) : element_tag = "element-6066-11e4-a52e-4f735466cecf" if isinstance ( payload , dict ) : if element_tag in payload : return [ payload [ element_tag ] ] elif isinstance ( payload , list ) : elements = [ item [ element_tag ] for item in payload if element_tag in item ] windows = [ item for item in payload if "CDwindow" in item ] if not elements and not windows : return None return elements + windows return None
Looks for any element, session, or window IDs, and returns them.
Looks for any element session or window IDs and returns them .
"""Looks for any element, session, or window IDs, and returns them.

  Payload should be passed as a dict or list.

  Args:
    payload: payload to check for IDs, as a python list or dict.
  Returns:
    list of ID strings, in order, in this payload
  """
list of ID strings, in order, in this payload
list of ID strings in order in this payload
payload
payload to check for IDs, as a python list or dict.
payload to check for IDs as a python list or dict .