| |
- __builtin__.object
-
- ReplayServer
- exceptions.Exception(exceptions.BaseException)
-
- ReplayError
-
- ReplayNotFoundError
- ReplayNotStartedError
class ReplayServer(__builtin__.object) |
|
Start and Stop Web Page Replay.
Web Page Replay is a proxy that can record and "replay" web pages with
simulated network characteristics -- without having to edit the pages
by hand. With WPR, tests can use "real" web content, and catch
performance issues that may result from introducing network delays and
bandwidth throttling.
Example:
with ReplayServer(archive_path):
NavigateToURL(start_url)
WaitUntil(...) |
|
Methods defined here:
- StartServer(self)
- Start Web Page Replay and verify that it started.
Returns:
(HTTP_PORT, HTTPS_PORT, DNS_PORT) # DNS_PORT is None if unused.
Raises:
ReplayNotStartedError: if Replay start-up fails.
- StopServer(self)
- Stop Web Page Replay.
- __enter__(self)
- Add support for with-statement.
- __exit__(self, unused_exc_type, unused_exc_val, unused_exc_tb)
- Add support for with-statement.
- __init__(self, archive_path, replay_host, http_port, https_port, dns_port, replay_options)
- Initialize ReplayServer.
Args:
archive_path: a path to a specific WPR archive (required).
replay_host: the hostname to serve traffic.
http_port: an integer port on which to serve HTTP traffic. May be zero
to let the OS choose an available port.
https_port: an integer port on which to serve HTTPS traffic. May be zero
to let the OS choose an available port.
dns_port: an integer port on which to serve DNS traffic. May be zero
to let the OS choose an available port. If None DNS forwarding is
disabled.
replay_options: an iterable of options strings to forward to replay.py.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |