telemetry.internal.util.webpagereplay
index
telemetry/internal/util/webpagereplay.py

Start and stop Web Page Replay.

 
Modules
       
atexit
telemetry.core.exceptions
logging
os
re
signal
subprocess
sys
tempfile
urllib
telemetry.core.util

 
Classes
       
__builtin__.object
ReplayServer
exceptions.Exception(exceptions.BaseException)
ReplayError
ReplayNotFoundError
ReplayNotStartedError

 
class ReplayError(exceptions.Exception)
    Catch-all exception for the module.
 
 
Method resolution order:
ReplayError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class ReplayNotFoundError(ReplayError)
    
Method resolution order:
ReplayNotFoundError
ReplayError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, label, path)
__str__(self)

Data descriptors inherited from ReplayError:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class ReplayNotStartedError(ReplayError)
    
Method resolution order:
ReplayNotStartedError
ReplayError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors inherited from ReplayError:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
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)