1 2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3<html><head><title>Python: module telemetry.page.actions.page_action</title> 4</head><body bgcolor="#f0f0f8"> 5 6<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 7<tr bgcolor="#7799ee"> 8<td valign=bottom> <br> 9<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.page.html"><font color="#ffffff">page</font></a>.<a href="telemetry.page.actions.html"><font color="#ffffff">actions</font></a>.page_action</strong></big></big></font></td 10><td align=right valign=bottom 11><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/page/actions/page_action.py">telemetry/page/actions/page_action.py</a></font></td></tr></table> 12 <p><tt># Copyright (c) 2012 The Chromium Authors. All rights reserved.<br> 13# Use of this source code is governed by a BSD-style license that can be<br> 14# found in the LICENSE file.</tt></p> 15<p> 16<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 17<tr bgcolor="#aa55cc"> 18<td colspan=3 valign=bottom> <br> 19<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 20 21<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 22<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.bounds.html">telemetry.core.timeline.bounds</a><br> 23</td><td width="25%" valign=top><a href="telemetry.page.actions.wait_until.html">telemetry.page.actions.wait_until</a><br> 24</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> 25<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 26<tr bgcolor="#ee77aa"> 27<td colspan=3 valign=bottom> <br> 28<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 29 30<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 31<td width="100%"><dl> 32<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 33</font></dt><dd> 34<dl> 35<dt><font face="helvetica, arial"><a href="telemetry.page.actions.page_action.html#PageAction">PageAction</a> 36</font></dt></dl> 37</dd> 38<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>) 39</font></dt><dd> 40<dl> 41<dt><font face="helvetica, arial"><a href="telemetry.page.actions.page_action.html#PageActionFailed">PageActionFailed</a> 42</font></dt><dt><font face="helvetica, arial"><a href="telemetry.page.actions.page_action.html#PageActionInvalidTimelineMarker">PageActionInvalidTimelineMarker</a> 43</font></dt><dt><font face="helvetica, arial"><a href="telemetry.page.actions.page_action.html#PageActionNotSupported">PageActionNotSupported</a> 44</font></dt></dl> 45</dd> 46</dl> 47 <p> 48<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 49<tr bgcolor="#ffc8d8"> 50<td colspan=3 valign=bottom> <br> 51<font color="#000000" face="helvetica, arial"><a name="PageAction">class <strong>PageAction</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> 52 53<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 54<td colspan=2><tt>Represents an action that a user might try to perform to a page.<br> </tt></td></tr> 55<tr><td> </td> 56<td width="100%">Methods defined here:<br> 57<dl><dt><a name="PageAction-BindMeasurementJavaScript"><strong>BindMeasurementJavaScript</strong></a>(self, tab, start_js, stop_js)</dt><dd><tt>Let this action determine when measurements should start and stop.<br> 58 <br> 59A measurement can call this method to provide the action<br> 60with JavaScript code that starts and stops measurements. The action<br> 61determines when to execute the provided JavaScript code, for more accurate<br> 62timings.<br> 63 <br> 64Args:<br> 65 tab: The tab to do everything on.<br> 66 start_js: JavaScript code that starts measurements.<br> 67 stop_js: JavaScript code that stops measurements.</tt></dd></dl> 68 69<dl><dt><a name="PageAction-CanBeBound"><strong>CanBeBound</strong></a>(self)</dt><dd><tt>If this class implements BindMeasurementJavaScript, override CanBeBound<br> 70to return True so that a test knows it can bind measurements.</tt></dd></dl> 71 72<dl><dt><a name="PageAction-CleanUp"><strong>CleanUp</strong></a>(self, page, tab)</dt></dl> 73 74<dl><dt><a name="PageAction-CustomizeBrowserOptionsForPageSet"><strong>CustomizeBrowserOptionsForPageSet</strong></a>(self, options)</dt><dd><tt>Override to add action-specific options to the BrowserOptions<br> 75<a href="__builtin__.html#object">object</a>. These options will be set for the whole page set.<br> 76 <br> 77If the browser is not being restarted for every page in the page set then<br> 78all browser options required for the action must be set here. This, however,<br> 79requires that they do not conflict with options require by other actions<br> 80used up by the page set.</tt></dd></dl> 81 82<dl><dt><a name="PageAction-GetActiveRangeOnTimeline"><strong>GetActiveRangeOnTimeline</strong></a>(self, timeline)</dt></dl> 83 84<dl><dt><a name="PageAction-RunAction"><strong>RunAction</strong></a>(self, page, tab)</dt></dl> 85 86<dl><dt><a name="PageAction-RunActionAndMaybeWait"><strong>RunActionAndMaybeWait</strong></a>(self, page, tab)</dt></dl> 87 88<dl><dt><a name="PageAction-WillRunAction"><strong>WillRunAction</strong></a>(self, page, tab)</dt><dd><tt>Override to do action-specific setup before<br> 89Test.WillRunAction is called.</tt></dd></dl> 90 91<dl><dt><a name="PageAction-WillWaitAfterRun"><strong>WillWaitAfterRun</strong></a>(self)</dt></dl> 92 93<dl><dt><a name="PageAction-__init__"><strong>__init__</strong></a>(self, attributes<font color="#909090">=None</font>)</dt></dl> 94 95<hr> 96Static methods defined here:<br> 97<dl><dt><a name="PageAction-ResetNextTimelineMarkerId"><strong>ResetNextTimelineMarkerId</strong></a>()</dt></dl> 98 99<hr> 100Data descriptors defined here:<br> 101<dl><dt><strong>__dict__</strong></dt> 102<dd><tt>dictionary for instance variables (if defined)</tt></dd> 103</dl> 104<dl><dt><strong>__weakref__</strong></dt> 105<dd><tt>list of weak references to the object (if defined)</tt></dd> 106</dl> 107</td></tr></table> <p> 108<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 109<tr bgcolor="#ffc8d8"> 110<td colspan=3 valign=bottom> <br> 111<font color="#000000" face="helvetica, arial"><a name="PageActionFailed">class <strong>PageActionFailed</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 112 113<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 114<td width="100%"><dl><dt>Method resolution order:</dt> 115<dd><a href="telemetry.page.actions.page_action.html#PageActionFailed">PageActionFailed</a></dd> 116<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 117<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 118<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 119</dl> 120<hr> 121Data descriptors defined here:<br> 122<dl><dt><strong>__weakref__</strong></dt> 123<dd><tt>list of weak references to the object (if defined)</tt></dd> 124</dl> 125<hr> 126Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 127<dl><dt><a name="PageActionFailed-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionFailed-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> 128 129<hr> 130Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 131<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#PageActionFailed-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 132 133<hr> 134Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 135<dl><dt><a name="PageActionFailed-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionFailed-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 136 137<dl><dt><a name="PageActionFailed-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionFailed-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 138 139<dl><dt><a name="PageActionFailed-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionFailed-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 140 141<dl><dt><a name="PageActionFailed-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionFailed-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 142 <br> 143Use of negative indices is not supported.</tt></dd></dl> 144 145<dl><dt><a name="PageActionFailed-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 146 147<dl><dt><a name="PageActionFailed-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionFailed-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 148 149<dl><dt><a name="PageActionFailed-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionFailed-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 150 151<dl><dt><a name="PageActionFailed-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 152 153<dl><dt><a name="PageActionFailed-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionFailed-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 154 155<dl><dt><a name="PageActionFailed-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 156 157<hr> 158Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 159<dl><dt><strong>__dict__</strong></dt> 160</dl> 161<dl><dt><strong>args</strong></dt> 162</dl> 163<dl><dt><strong>message</strong></dt> 164</dl> 165</td></tr></table> <p> 166<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 167<tr bgcolor="#ffc8d8"> 168<td colspan=3 valign=bottom> <br> 169<font color="#000000" face="helvetica, arial"><a name="PageActionInvalidTimelineMarker">class <strong>PageActionInvalidTimelineMarker</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 170 171<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 172<td width="100%"><dl><dt>Method resolution order:</dt> 173<dd><a href="telemetry.page.actions.page_action.html#PageActionInvalidTimelineMarker">PageActionInvalidTimelineMarker</a></dd> 174<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 175<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 176<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 177</dl> 178<hr> 179Data descriptors defined here:<br> 180<dl><dt><strong>__weakref__</strong></dt> 181<dd><tt>list of weak references to the object (if defined)</tt></dd> 182</dl> 183<hr> 184Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 185<dl><dt><a name="PageActionInvalidTimelineMarker-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionInvalidTimelineMarker-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> 186 187<hr> 188Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 189<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#PageActionInvalidTimelineMarker-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 190 191<hr> 192Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 193<dl><dt><a name="PageActionInvalidTimelineMarker-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionInvalidTimelineMarker-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 194 195<dl><dt><a name="PageActionInvalidTimelineMarker-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionInvalidTimelineMarker-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 196 197<dl><dt><a name="PageActionInvalidTimelineMarker-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionInvalidTimelineMarker-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 198 199<dl><dt><a name="PageActionInvalidTimelineMarker-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionInvalidTimelineMarker-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 200 <br> 201Use of negative indices is not supported.</tt></dd></dl> 202 203<dl><dt><a name="PageActionInvalidTimelineMarker-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 204 205<dl><dt><a name="PageActionInvalidTimelineMarker-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionInvalidTimelineMarker-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 206 207<dl><dt><a name="PageActionInvalidTimelineMarker-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionInvalidTimelineMarker-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 208 209<dl><dt><a name="PageActionInvalidTimelineMarker-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 210 211<dl><dt><a name="PageActionInvalidTimelineMarker-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionInvalidTimelineMarker-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 212 213<dl><dt><a name="PageActionInvalidTimelineMarker-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 214 215<hr> 216Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 217<dl><dt><strong>__dict__</strong></dt> 218</dl> 219<dl><dt><strong>args</strong></dt> 220</dl> 221<dl><dt><strong>message</strong></dt> 222</dl> 223</td></tr></table> <p> 224<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 225<tr bgcolor="#ffc8d8"> 226<td colspan=3 valign=bottom> <br> 227<font color="#000000" face="helvetica, arial"><a name="PageActionNotSupported">class <strong>PageActionNotSupported</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 228 229<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 230<td width="100%"><dl><dt>Method resolution order:</dt> 231<dd><a href="telemetry.page.actions.page_action.html#PageActionNotSupported">PageActionNotSupported</a></dd> 232<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 233<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 234<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 235</dl> 236<hr> 237Data descriptors defined here:<br> 238<dl><dt><strong>__weakref__</strong></dt> 239<dd><tt>list of weak references to the object (if defined)</tt></dd> 240</dl> 241<hr> 242Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 243<dl><dt><a name="PageActionNotSupported-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionNotSupported-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> 244 245<hr> 246Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 247<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#PageActionNotSupported-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 248 249<hr> 250Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 251<dl><dt><a name="PageActionNotSupported-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionNotSupported-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 252 253<dl><dt><a name="PageActionNotSupported-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionNotSupported-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 254 255<dl><dt><a name="PageActionNotSupported-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionNotSupported-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 256 257<dl><dt><a name="PageActionNotSupported-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionNotSupported-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 258 <br> 259Use of negative indices is not supported.</tt></dd></dl> 260 261<dl><dt><a name="PageActionNotSupported-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 262 263<dl><dt><a name="PageActionNotSupported-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionNotSupported-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 264 265<dl><dt><a name="PageActionNotSupported-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionNotSupported-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 266 267<dl><dt><a name="PageActionNotSupported-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 268 269<dl><dt><a name="PageActionNotSupported-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#PageActionNotSupported-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 270 271<dl><dt><a name="PageActionNotSupported-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 272 273<hr> 274Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 275<dl><dt><strong>__dict__</strong></dt> 276</dl> 277<dl><dt><strong>args</strong></dt> 278</dl> 279<dl><dt><strong>message</strong></dt> 280</dl> 281</td></tr></table></td></tr></table> 282</body></html>