| |
- __builtin__.object
-
- DevToolsClientBackend
- telemetry.core.exceptions.Error(exceptions.Exception)
-
- TabNotFoundError
class DevToolsClientBackend(__builtin__.object) |
|
An object that communicates with Chrome's devtools.
This class owns a map of InspectorBackends. It is responsible for creating
them and destroying them. |
|
Methods defined here:
- ActivateTab(self, tab_id, timeout)
- Activates the tab with the given id.
Raises:
devtools_http.DevToolsClientConnectionError
TabNotFoundError
- Close(self)
- CloseTab(self, tab_id, timeout)
- Closes the tab with the given id.
Raises:
devtools_http.DevToolsClientConnectionError
TabNotFoundError
- DumpMemory(self, timeout=30)
- Dumps memory.
Returns:
GUID of the generated dump if successful, None otherwise.
Raises:
TracingTimeoutException: If more than |timeout| seconds has passed
since the last time any data is received.
TracingUnrecoverableException: If there is a websocket error.
TracingUnexpectedResponseException: If the response contains an error
or does not contain the expected result.
- GetChromeBranchNumber(*args, **kwargs)
- GetUpdatedInspectableContexts(self)
- Returns an updated instance of _DevToolsContextMapBackend.
- GetUrl(self, tab_id)
- Returns the URL of the tab with |tab_id|, as reported by devtools.
Raises:
devtools_http.DevToolsClientConnectionError
- IsAlive(self)
- Whether the DevTools server is available and connectable.
- IsChromeTracingSupported(self)
- IsInspectable(self, tab_id)
- Whether the tab with |tab_id| is inspectable, as reported by devtools.
Raises:
devtools_http.DevToolsClientConnectionError
- RequestNewTab(self, timeout)
- Creates a new tab.
Returns:
A JSON string as returned by DevTools. Example:
{
"description": "",
"devtoolsFrontendUrl":
"/devtools/inspector.html?ws=host:port/devtools/page/id-string",
"id": "id-string",
"title": "Page Title",
"type": "page",
"url": "url",
"webSocketDebuggerUrl": "ws://host:port/devtools/page/id-string"
}
Raises:
devtools_http.DevToolsClientConnectionError
- SetMemoryPressureNotificationsSuppressed(self, suppressed, timeout=30)
- Enable/disable suppressing memory pressure notifications.
Args:
suppressed: If true, memory pressure notifications will be suppressed.
timeout: The timeout in seconds.
Raises:
MemoryTimeoutException: If more than |timeout| seconds has passed
since the last time any data is received.
MemoryUnrecoverableException: If there is a websocket error.
MemoryUnexpectedResponseException: If the response contains an error
or does not contain the expected result.
- SimulateMemoryPressureNotification(self, pressure_level, timeout=30)
- Simulate a memory pressure notification.
Args:
pressure level: The memory pressure level of the notification ('moderate'
or 'critical').
timeout: The timeout in seconds.
Raises:
MemoryTimeoutException: If more than |timeout| seconds has passed
since the last time any data is received.
MemoryUnrecoverableException: If there is a websocket error.
MemoryUnexpectedResponseException: If the response contains an error
or does not contain the expected result.
- StartChromeTracing(self, trace_options, custom_categories=None, timeout=10)
- Args:
trace_options: An tracing_options.TracingOptions instance.
custom_categories: An optional string containing a list of
comma separated categories that will be traced
instead of the default category set. Example: use
"webkit,cc,disabled-by-default-cc.debug" to trace only
those three event categories.
- StopChromeTracing(self, trace_data_builder, timeout=30)
- __init__(self, devtools_port, remote_devtools_port, app_backend)
- Creates a new DevToolsClientBackend.
A DevTools agent must exist on the given devtools_port.
Args:
devtools_port: The port to use to connect to DevTools agent.
remote_devtools_port: In some cases (e.g., app running on
Android device, devtools_port is the forwarded port on the
host platform. We also need to know the remote_devtools_port
so that we can uniquely identify the DevTools agent.
app_backend: For the app that contains the DevTools agent.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- is_tracing_running
- remote_port
- support_startup_tracing
- supports_overriding_memory_pressure_notifications
- supports_tracing
|
|