| |
- __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)
- GetSystemInfo(self)
- Returns low-level information about the system, if available.
See the documentation of the SystemInfo class for more details.
- 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)
- Start(self)
- StartLocalServer(self, server)
- Starts a LocalServer and associates it with this browser.
It will be closed when the browser closes.
- StartProfiling(self, profiler_name, base_output_file)
- Starts profiling using |profiler_name|. 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.
Returns:
A list of filenames produced by the profiler.
- StopTracing(self)
- Stops tracing and returns the result as TimelineData object.
- __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
- cpu_stats
- Returns a dict of cpu statistics for the system.
{ 'Browser': {
'CpuProcessTime': S,
'TotalTime': T
},
'Gpu': {
'CpuProcessTime': S,
'TotalTime': T
},
'Renderer': {
'CpuProcessTime': S,
'TotalTime': T
}
}
Any of the above keys may be missing on a per-platform basis.
- extensions
- foreground_tab
- 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.
- is_tracing_running
- local_servers
- Returns the currently running local servers.
- memory_stats
- Returns a dict of memory statistics for the browser:
{ 'Browser': {
'VM': R,
'VMPeak': S,
'WorkingSetSize': T,
'WorkingSetSizePeak': U,
'ProportionalSetSize': V,
'PrivateDirty': W
},
'Gpu': {
'VM': R,
'VMPeak': S,
'WorkingSetSize': T,
'WorkingSetSizePeak': U,
'ProportionalSetSize': V,
'PrivateDirty': W
},
'Renderer': {
'VM': R,
'VMPeak': S,
'WorkingSetSize': T,
'WorkingSetSizePeak': U,
'ProportionalSetSize': V,
'PrivateDirty': W
},
'SystemCommitCharge': X,
'SystemTotalPhysicalMemory': Y,
'ProcessCount': Z,
}
Any of the above keys may be missing on a per-platform basis.
- platform
- supports_extensions
- supports_system_info
- supports_tab_control
- supports_tracing
- synthetic_gesture_source_type
- tabs
| |