| |
- __builtin__.object
-
- Browser
class Browser(__builtin__.object) |
|
A running browser instance that can be controlled in a limited way.
To create a browser instance, use browser_finder.FindBrowser.
Be sure to clean up after yourself by calling Close() when you are done with
the browser. Or better yet:
browser_to_create = FindBrowser(options)
with browser_to_create.Create() as browser:
... do all your operations on browser here |
|
Methods defined here:
- Close(self)
- Closes this browser.
- GetStackTrace(self)
- GetStandardOutput(self)
- GetTraceResultAndReset(self)
- Returns the result of the trace, as TraceResult object.
- SetHTTPServerDirectories(self, paths)
- Returns True if the HTTP server was started, False otherwise.
- SetReplayArchivePath(self, archive_path, append_to_existing_wpr=False, make_javascript_deterministic=True)
- StartProfiling(self, options, base_output_file)
- Starts profiling using |options|.profiler_tool. Results are saved to
|base_output_file|.<process_name>.
- StartTracing(self, custom_categories=None, timeout=10)
- StopProfiling(self)
- Stops all active profilers and saves their results.
- StopTracing(self)
- __enter__(self)
- __exit__(self, *args)
- __init__(self, backend, platform_backend)
- is_profiler_active(self, profiler_name)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- browser_type
- extensions
- Returns the extension dictionary if it exists.
- http_server
- io_stats
- Returns a dict of IO statistics for the browser:
{ 'Browser': {
'ReadOperationCount': W,
'WriteOperationCount': X,
'ReadTransferCount': Y,
'WriteTransferCount': Z
},
'Gpu': {
'ReadOperationCount': W,
'WriteOperationCount': X,
'ReadTransferCount': Y,
'WriteTransferCount': Z
},
'Renderer': {
'ReadOperationCount': W,
'WriteOperationCount': X,
'ReadTransferCount': Y,
'WriteTransferCount': Z
}
}
- is_content_shell
- Returns whether this browser is a content shell, only.
- memory_stats
- Returns a dict of memory statistics for the browser:
{ 'Browser': {
'VM': S,
'VMPeak': T,
'WorkingSetSize': U,
'WorkingSetSizePeak': V,
'ProportionalSetSize': W,
'PrivateDirty': X
},
'Gpu': {
'VM': S,
'VMPeak': T,
'WorkingSetSize': U,
'WorkingSetSizePeak': V,
'ProportionalSetSize': W,
'PrivateDirty': X
},
'Renderer': {
'VM': S,
'VMPeak': T,
'WorkingSetSize': U,
'WorkingSetSizePeak': V,
'ProportionalSetSize': W,
'PrivateDirty': X
},
'SystemCommitCharge': Y,
'ProcessCount': Z,
}
Any of the above keys may be missing on a per-platform basis.
- platform
- supports_extensions
- supports_tab_control
- supports_tracing
- tabs
| |