1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3 <html><head><title>Python: module telemetry.internal.actions.loop</title> 4 <meta charset="utf-8"> 5 </head><body bgcolor="#f0f0f8"> 6 7 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 8 <tr bgcolor="#7799ee"> 9 <td valign=bottom> <br> 10 <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>.loop</strong></big></big></font></td 11 ><td align=right valign=bottom 12 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/actions/loop.py">telemetry/internal/actions/loop.py</a></font></td></tr></table> 13 <p><tt>A Telemetry page_action that loops media playback.<br> 14 <br> 15 Action parameters are:<br> 16 - loop_count: The number of times to loop media.<br> 17 - selector: If no selector is defined then the action attempts to loop the first<br> 18 media element on the page. If 'all' then loop all media elements.<br> 19 - timeout_in_seconds: Timeout to wait for media to loop. Default is<br> 20 60 sec x loop_count. 0 means do not wait.</tt></p> 21 <p> 22 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 23 <tr bgcolor="#aa55cc"> 24 <td colspan=3 valign=bottom> <br> 25 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 26 27 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 28 <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> 29 </td><td width="25%" valign=top><a href="telemetry.internal.actions.media_action.html">telemetry.internal.actions.media_action</a><br> 30 </td><td width="25%" valign=top><a href="telemetry.internal.actions.page_action.html">telemetry.internal.actions.page_action</a><br> 31 </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> 32 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 33 <tr bgcolor="#ee77aa"> 34 <td colspan=3 valign=bottom> <br> 35 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 36 37 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 38 <td width="100%"><dl> 39 <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>) 40 </font></dt><dd> 41 <dl> 42 <dt><font face="helvetica, arial"><a href="telemetry.internal.actions.loop.html#LoopAction">LoopAction</a> 43 </font></dt></dl> 44 </dd> 45 </dl> 46 <p> 47 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 48 <tr bgcolor="#ffc8d8"> 49 <td colspan=3 valign=bottom> <br> 50 <font color="#000000" face="helvetica, arial"><a name="LoopAction">class <strong>LoopAction</strong></a>(<a href="telemetry.internal.actions.media_action.html#MediaAction">telemetry.internal.actions.media_action.MediaAction</a>)</font></td></tr> 51 52 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 53 <td width="100%"><dl><dt>Method resolution order:</dt> 54 <dd><a href="telemetry.internal.actions.loop.html#LoopAction">LoopAction</a></dd> 55 <dd><a href="telemetry.internal.actions.media_action.html#MediaAction">telemetry.internal.actions.media_action.MediaAction</a></dd> 56 <dd><a href="telemetry.internal.actions.page_action.html#PageAction">telemetry.internal.actions.page_action.PageAction</a></dd> 57 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 58 </dl> 59 <hr> 60 Methods defined here:<br> 61 <dl><dt><a name="LoopAction-RunAction"><strong>RunAction</strong></a>(self, tab)</dt></dl> 62 63 <dl><dt><a name="LoopAction-WillRunAction"><strong>WillRunAction</strong></a>(self, tab)</dt><dd><tt>Load the media metrics JS code prior to running the action.</tt></dd></dl> 64 65 <dl><dt><a name="LoopAction-__init__"><strong>__init__</strong></a>(self, loop_count, selector<font color="#909090">=None</font>, timeout_in_seconds<font color="#909090">=None</font>)</dt></dl> 66 67 <hr> 68 Methods inherited from <a href="telemetry.internal.actions.media_action.html#MediaAction">telemetry.internal.actions.media_action.MediaAction</a>:<br> 69 <dl><dt><a name="LoopAction-HasEventCompletedOrError"><strong>HasEventCompletedOrError</strong></a>(self, tab, selector, event_name)</dt></dl> 70 71 <dl><dt><a name="LoopAction-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> 72 73 <dl><dt><a name="LoopAction-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> 74 <br> 75 Args:<br> 76 tab: The tab to check for event on.<br> 77 selector: Media element selector.<br> 78 event_name: Name of the event to check if fired or not.<br> 79 timeout_in_seconds: Timeout to check for event, throws an exception if<br> 80 not fired.</tt></dd></dl> 81 82 <hr> 83 Methods inherited from <a href="telemetry.internal.actions.page_action.html#PageAction">telemetry.internal.actions.page_action.PageAction</a>:<br> 84 <dl><dt><a name="LoopAction-CleanUp"><strong>CleanUp</strong></a>(self, tab)</dt></dl> 85 86 <hr> 87 Data descriptors inherited from <a href="telemetry.internal.actions.page_action.html#PageAction">telemetry.internal.actions.page_action.PageAction</a>:<br> 88 <dl><dt><strong>__dict__</strong></dt> 89 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 90 </dl> 91 <dl><dt><strong>__weakref__</strong></dt> 92 <dd><tt>list of weak references to the object (if defined)</tt></dd> 93 </dl> 94 </td></tr></table></td></tr></table> 95 </body></html>