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">
6 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"heading">
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>
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>
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>
30 <tr><td bgcolor=
"#ee77aa"><tt> </tt></td><td> </td>
32 <dt><font face=
"helvetica, arial"><a href=
"__builtin__.html#object">__builtin__.object
</a>
35 <dt><font face=
"helvetica, arial"><a href=
"telemetry.page.actions.page_action.html#PageAction">PageAction
</a>
38 <dt><font face=
"helvetica, arial"><a href=
"exceptions.html#Exception">exceptions.Exception
</a>(
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>)
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>
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>
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>
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>
59 A
measurement
can
call
this
method
to
provide
the
action
<br>
60 with
JavaScript
code
that
starts
and
stops
measurements.
The
action
<br>
61 determines
when
to
execute
the
provided
JavaScript
code,
for
more
accurate
<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>
69 <dl><dt><a name=
"PageAction-CanBeBound"><strong>CanBeBound
</strong></a>(self)
</dt><dd><tt>If
this
class
implements
BindMeasurementJavaScript,
override
CanBeBound
<br>
70 to
return
True
so
that
a
test
knows
it
can
bind
measurements.
</tt></dd></dl>
72 <dl><dt><a name=
"PageAction-CleanUp"><strong>CleanUp
</strong></a>(self, page, tab)
</dt></dl>
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>
77 If
the
browser
is
not
being
restarted
for
every
page
in
the
page
set
then
<br>
78 all
browser
options
required
for
the
action
must
be
set
here.
This,
however,
<br>
79 requires
that
they
do
not
conflict
with
options
require
by
other
actions
<br>
80 used
up
by
the
page
set.
</tt></dd></dl>
82 <dl><dt><a name=
"PageAction-GetActiveRangeOnTimeline"><strong>GetActiveRangeOnTimeline
</strong></a>(self, timeline)
</dt></dl>
84 <dl><dt><a name=
"PageAction-RunAction"><strong>RunAction
</strong></a>(self, page, tab)
</dt></dl>
86 <dl><dt><a name=
"PageAction-RunActionAndMaybeWait"><strong>RunActionAndMaybeWait
</strong></a>(self, page, tab)
</dt></dl>
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>
89 Test.WillRunAction
is
called.
</tt></dd></dl>
91 <dl><dt><a name=
"PageAction-WillWaitAfterRun"><strong>WillWaitAfterRun
</strong></a>(self)
</dt></dl>
93 <dl><dt><a name=
"PageAction-__init__"><strong>__init__
</strong></a>(self, attributes
<font color=
"#909090">=None
</font>)
</dt></dl>
96 Static methods defined here:
<br>
97 <dl><dt><a name=
"PageAction-ResetNextTimelineMarkerId"><strong>ResetNextTimelineMarkerId
</strong></a>()
</dt></dl>
100 Data descriptors defined here:
<br>
101 <dl><dt><strong>__dict__
</strong></dt>
102 <dd><tt>dictionary
for
instance
variables
(if
defined)
</tt></dd>
104 <dl><dt><strong>__weakref__
</strong></dt>
105 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
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>
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>
121 Data 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>
126 Methods 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>
130 Data 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>
134 Methods 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>
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>
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>
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>
143 Use
of
negative
indices
is
not
supported.
</tt></dd></dl>
145 <dl><dt><a name=
"PageActionFailed-__reduce__"><strong>__reduce__
</strong></a>(...)
</dt></dl>
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>
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>
151 <dl><dt><a name=
"PageActionFailed-__setstate__"><strong>__setstate__
</strong></a>(...)
</dt></dl>
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>
155 <dl><dt><a name=
"PageActionFailed-__unicode__"><strong>__unicode__
</strong></a>(...)
</dt></dl>
158 Data descriptors inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
159 <dl><dt><strong>__dict__
</strong></dt>
161 <dl><dt><strong>args
</strong></dt>
163 <dl><dt><strong>message
</strong></dt>
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>
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>
179 Data 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>
184 Methods 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>
188 Data 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>
192 Methods 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>
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>
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>
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>
201 Use
of
negative
indices
is
not
supported.
</tt></dd></dl>
203 <dl><dt><a name=
"PageActionInvalidTimelineMarker-__reduce__"><strong>__reduce__
</strong></a>(...)
</dt></dl>
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>
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>
209 <dl><dt><a name=
"PageActionInvalidTimelineMarker-__setstate__"><strong>__setstate__
</strong></a>(...)
</dt></dl>
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>
213 <dl><dt><a name=
"PageActionInvalidTimelineMarker-__unicode__"><strong>__unicode__
</strong></a>(...)
</dt></dl>
216 Data descriptors inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
217 <dl><dt><strong>__dict__
</strong></dt>
219 <dl><dt><strong>args
</strong></dt>
221 <dl><dt><strong>message
</strong></dt>
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>
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>
237 Data 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>
242 Methods 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>
246 Data 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>
250 Methods 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>
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>
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>
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>
259 Use
of
negative
indices
is
not
supported.
</tt></dd></dl>
261 <dl><dt><a name=
"PageActionNotSupported-__reduce__"><strong>__reduce__
</strong></a>(...)
</dt></dl>
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>
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>
267 <dl><dt><a name=
"PageActionNotSupported-__setstate__"><strong>__setstate__
</strong></a>(...)
</dt></dl>
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>
271 <dl><dt><a name=
"PageActionNotSupported-__unicode__"><strong>__unicode__
</strong></a>(...)
</dt></dl>
274 Data descriptors inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
275 <dl><dt><strong>__dict__
</strong></dt>
277 <dl><dt><strong>args
</strong></dt>
279 <dl><dt><strong>message
</strong></dt>
281 </td></tr></table></td></tr></table>