telemetry.page.actions.play
index
telemetry/page/actions/play.py

A Telemetry page_action that performs the "play" action on media elements.
 
Media elements can be specified by a selector attribute. If no selector is
defined then then the action attempts to play the first video element or audio
element on the page. A selector can also be 'all' to play all media elements.
 
Other attributes to use are: wait_for_playing and wait_for_ended, which forces
the action to wait until playing and ended events get fired respectively.

 
Modules
       
telemetry.core.exceptions
os
telemetry.page.actions.page_action
telemetry.core.util

 
Classes
       
telemetry.page.actions.page_action.PageAction(__builtin__.object)
PlayAction

 
class PlayAction(telemetry.page.actions.page_action.PageAction)
    
Method resolution order:
PlayAction
telemetry.page.actions.page_action.PageAction
__builtin__.object

Methods defined here:
HasEventCompleted(self, tab, selector, event_name)
RunAction(self, page, tab, previous_action)
WaitForEvent(self, tab, selector, event_name, timeout)
Halts play action until the selector's event is fired.
WillRunAction(self, page, tab)
Load the media metrics JS code prior to running the action.
__init__(self, attributes=None)

Methods inherited from telemetry.page.actions.page_action.PageAction:
BindMeasurementJavaScript(self, tab, start_js, stop_js)
Let this action determine when measurements should start and stop.
 
A measurement can call this method to provide the action
with JavaScript code that starts and stops measurements. The action
determines when to execute the provided JavaScript code, for more accurate
timings.
 
Args:
  tab: The tab to do everything on.
  start_js: JavaScript code that starts measurements.
  stop_js: JavaScript code that stops measurements.
CanBeBound(self)
If this class implements BindMeasurementJavaScript, override CanBeBound
to return True so that a test knows it can bind measurements.
CleanUp(self, page, tab)
CustomizeBrowserOptions(self, options)
Override to add action-specific options to the BrowserOptions
object.
RunsPreviousAction(self)
Some actions require some initialization to be performed before the
previous action. For example, wait for href change needs to record the old
href before the previous action changes it. Therefore, we allow actions to
run the previous action. An action that does this should override this to
return True in order to prevent the previous action from being run twice.

Data descriptors inherited from telemetry.page.actions.page_action.PageAction:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)