<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>Python: module telemetry.internal.actions.seek</title> <meta charset="utf-8"> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.actions.html"><font color="#ffffff">actions</font></a>.seek</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/actions/seek.py">telemetry/internal/actions/seek.py</a></font></td></tr></table> <p><tt>A Telemetry page_action that performs the "seek" action on media elements.<br> <br> Action parameters are:<br> - seconds: The media time to seek to. Test fails if not provided.<br> - selector: If no selector is defined then the action attempts to seek the first<br> media element on the page. If 'all' then seek all media elements.<br> - timeout_in_seconds: Maximum waiting time for the "seeked" event<br> (dispatched when the seeked operation completes)<br> to be fired. 0 means do not wait.<br> - log_time: If true the seek time is recorded, otherwise media<br> measurement will not be aware of the seek action. Used to<br> perform multiple seeks. Default true.<br> - label: A suffix string to name the seek perf measurement.</tt></p> <p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#aa55cc"> <td colspan=3 valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br> </td><td width="25%" valign=top><a href="telemetry.internal.actions.media_action.html">telemetry.internal.actions.media_action</a><br> </td><td width="25%" valign=top><a href="telemetry.internal.actions.page_action.html">telemetry.internal.actions.page_action</a><br> </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> <td colspan=3 valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> <td width="100%"><dl> <dt><font face="helvetica, arial"><a href="telemetry.internal.actions.media_action.html#MediaAction">telemetry.internal.actions.media_action.MediaAction</a>(<a href="telemetry.internal.actions.page_action.html#PageAction">telemetry.internal.actions.page_action.PageAction</a>) </font></dt><dd> <dl> <dt><font face="helvetica, arial"><a href="telemetry.internal.actions.seek.html#SeekAction">SeekAction</a> </font></dt></dl> </dd> </dl> <p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="SeekAction">class <strong>SeekAction</strong></a>(<a href="telemetry.internal.actions.media_action.html#MediaAction">telemetry.internal.actions.media_action.MediaAction</a>)</font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%"><dl><dt>Method resolution order:</dt> <dd><a href="telemetry.internal.actions.seek.html#SeekAction">SeekAction</a></dd> <dd><a href="telemetry.internal.actions.media_action.html#MediaAction">telemetry.internal.actions.media_action.MediaAction</a></dd> <dd><a href="telemetry.internal.actions.page_action.html#PageAction">telemetry.internal.actions.page_action.PageAction</a></dd> <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> </dl> <hr> Methods defined here:<br> <dl><dt><a name="SeekAction-RunAction"><strong>RunAction</strong></a>(self, tab)</dt></dl> <dl><dt><a name="SeekAction-WillRunAction"><strong>WillRunAction</strong></a>(self, tab)</dt><dd><tt>Load the media metrics JS code prior to running the action.</tt></dd></dl> <dl><dt><a name="SeekAction-__init__"><strong>__init__</strong></a>(self, seconds, selector<font color="#909090">=None</font>, timeout_in_seconds<font color="#909090">=0</font>, log_time<font color="#909090">=True</font>, label<font color="#909090">=''</font>)</dt></dl> <hr> Methods inherited from <a href="telemetry.internal.actions.media_action.html#MediaAction">telemetry.internal.actions.media_action.MediaAction</a>:<br> <dl><dt><a name="SeekAction-HasEventCompletedOrError"><strong>HasEventCompletedOrError</strong></a>(self, tab, selector, event_name)</dt></dl> <dl><dt><a name="SeekAction-LoadJS"><strong>LoadJS</strong></a>(self, tab, js_file_name)</dt><dd><tt>Loads and executes a JS file in the tab.</tt></dd></dl> <dl><dt><a name="SeekAction-WaitForEvent"><strong>WaitForEvent</strong></a>(self, tab, selector, event_name, timeout_in_seconds)</dt><dd><tt>Halts media action until the selector's event is fired.<br> <br> Args:<br> tab: The tab to check for event on.<br> selector: Media element selector.<br> event_name: Name of the event to check if fired or not.<br> timeout_in_seconds: Timeout to check for event, throws an exception if<br> not fired.</tt></dd></dl> <hr> Methods inherited from <a href="telemetry.internal.actions.page_action.html#PageAction">telemetry.internal.actions.page_action.PageAction</a>:<br> <dl><dt><a name="SeekAction-CleanUp"><strong>CleanUp</strong></a>(self, tab)</dt></dl> <hr> Data descriptors inherited from <a href="telemetry.internal.actions.page_action.html#PageAction">telemetry.internal.actions.page_action.PageAction</a>:<br> <dl><dt><strong>__dict__</strong></dt> <dd><tt>dictionary for instance variables (if defined)</tt></dd> </dl> <dl><dt><strong>__weakref__</strong></dt> <dd><tt>list of weak references to the object (if defined)</tt></dd> </dl> </td></tr></table></td></tr></table> </body></html>