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=
"#ee77aa">
18 <td colspan=
3 valign=bottom
> <br>
19 <font color=
"#ffffff" face=
"helvetica, arial"><big><strong>Classes
</strong></big></font></td></tr>
21 <tr><td bgcolor=
"#ee77aa"><tt> </tt></td><td> </td>
23 <dt><font face=
"helvetica, arial"><a href=
"__builtin__.html#object">__builtin__.object
</a>
26 <dt><font face=
"helvetica, arial"><a href=
"telemetry.page.actions.page_action.html#PageAction">PageAction
</a>
29 <dt><font face=
"helvetica, arial"><a href=
"exceptions.html#Exception">exceptions.Exception
</a>(
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>)
32 <dt><font face=
"helvetica, arial"><a href=
"telemetry.page.actions.page_action.html#PageActionFailed">PageActionFailed
</a>
33 </font></dt><dt><font face=
"helvetica, arial"><a href=
"telemetry.page.actions.page_action.html#PageActionNotSupported">PageActionNotSupported
</a>
38 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
39 <tr bgcolor=
"#ffc8d8">
40 <td colspan=
3 valign=bottom
> <br>
41 <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>
43 <tr bgcolor=
"#ffc8d8"><td rowspan=
2><tt> </tt></td>
44 <td colspan=
2><tt>Represents
an
action
that
a
user
might
try
to
perform
to
a
page.
<br> </tt></td></tr>
46 <td width=
"100%">Methods defined here:
<br>
47 <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>
49 A
measurement
can
call
this
method
to
provide
the
action
<br>
50 with
JavaScript
code
that
starts
and
stops
measurements.
The
action
<br>
51 determines
when
to
execute
the
provided
JavaScript
code,
for
more
accurate
<br>
55 tab:
The
tab
to
do
everything
on.
<br>
56 start_js:
JavaScript
code
that
starts
measurements.
<br>
57 stop_js:
JavaScript
code
that
stops
measurements.
</tt></dd></dl>
59 <dl><dt><a name=
"PageAction-CanBeBound"><strong>CanBeBound
</strong></a>(self)
</dt><dd><tt>If
this
class
implements
BindMeasurementJavaScript,
override
CanBeBound
<br>
60 to
return
True
so
that
a
test
knows
it
can
bind
measurements.
</tt></dd></dl>
62 <dl><dt><a name=
"PageAction-CleanUp"><strong>CleanUp
</strong></a>(self, page, tab)
</dt></dl>
64 <dl><dt><a name=
"PageAction-CustomizeBrowserOptions"><strong>CustomizeBrowserOptions
</strong></a>(self, options)
</dt><dd><tt>Override
to
add
action-specific
options
to
the
BrowserOptions
<br>
65 <a href=
"__builtin__.html#object">object
</a>.
</tt></dd></dl>
67 <dl><dt><a name=
"PageAction-RunAction"><strong>RunAction
</strong></a>(self, page, tab, previous_action)
</dt></dl>
69 <dl><dt><a name=
"PageAction-RunsPreviousAction"><strong>RunsPreviousAction
</strong></a>(self)
</dt><dd><tt>Some
actions
require
some
initialization
to
be
performed
before
the
<br>
70 previous
action.
For
example,
wait
for
href
change
needs
to
record
the
old
<br>
71 href
before
the
previous
action
changes
it.
Therefore,
we
allow
actions
to
<br>
72 run
the
previous
action.
An
action
that
does
this
should
override
this
to
<br>
73 return
True
in
order
to
prevent
the
previous
action
from
being
run
twice.
</tt></dd></dl>
75 <dl><dt><a name=
"PageAction-WillRunAction"><strong>WillRunAction
</strong></a>(self, page, tab)
</dt><dd><tt>Override
to
do
action-specific
setup
before
<br>
76 Test.WillRunAction
is
called.
</tt></dd></dl>
78 <dl><dt><a name=
"PageAction-__init__"><strong>__init__
</strong></a>(self, attributes
<font color=
"#909090">=None
</font>)
</dt></dl>
81 Data descriptors defined here:
<br>
82 <dl><dt><strong>__dict__
</strong></dt>
83 <dd><tt>dictionary
for
instance
variables
(if
defined)
</tt></dd>
85 <dl><dt><strong>__weakref__
</strong></dt>
86 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
88 </td></tr></table> <p>
89 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
90 <tr bgcolor=
"#ffc8d8">
91 <td colspan=
3 valign=bottom
> <br>
92 <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>
94 <tr><td bgcolor=
"#ffc8d8"><tt> </tt></td><td> </td>
95 <td width=
"100%"><dl><dt>Method resolution order:
</dt>
96 <dd><a href=
"telemetry.page.actions.page_action.html#PageActionFailed">PageActionFailed
</a></dd>
97 <dd><a href=
"exceptions.html#Exception">exceptions.Exception
</a></dd>
98 <dd><a href=
"exceptions.html#BaseException">exceptions.BaseException
</a></dd>
99 <dd><a href=
"__builtin__.html#object">__builtin__.object
</a></dd>
102 Data descriptors defined here:
<br>
103 <dl><dt><strong>__weakref__
</strong></dt>
104 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
107 Methods inherited from
<a href=
"exceptions.html#Exception">exceptions.Exception
</a>:
<br>
108 <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>
111 Data and other attributes inherited from
<a href=
"exceptions.html#Exception">exceptions.Exception
</a>:
<br>
112 <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>
115 Methods inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
116 <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>
118 <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>
120 <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>
122 <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>
124 Use
of
negative
indices
is
not
supported.
</tt></dd></dl>
126 <dl><dt><a name=
"PageActionFailed-__reduce__"><strong>__reduce__
</strong></a>(...)
</dt></dl>
128 <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>
130 <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>
132 <dl><dt><a name=
"PageActionFailed-__setstate__"><strong>__setstate__
</strong></a>(...)
</dt></dl>
134 <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>
136 <dl><dt><a name=
"PageActionFailed-__unicode__"><strong>__unicode__
</strong></a>(...)
</dt></dl>
139 Data descriptors inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
140 <dl><dt><strong>__dict__
</strong></dt>
142 <dl><dt><strong>args
</strong></dt>
144 <dl><dt><strong>message
</strong></dt>
146 </td></tr></table> <p>
147 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
148 <tr bgcolor=
"#ffc8d8">
149 <td colspan=
3 valign=bottom
> <br>
150 <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>
152 <tr><td bgcolor=
"#ffc8d8"><tt> </tt></td><td> </td>
153 <td width=
"100%"><dl><dt>Method resolution order:
</dt>
154 <dd><a href=
"telemetry.page.actions.page_action.html#PageActionNotSupported">PageActionNotSupported
</a></dd>
155 <dd><a href=
"exceptions.html#Exception">exceptions.Exception
</a></dd>
156 <dd><a href=
"exceptions.html#BaseException">exceptions.BaseException
</a></dd>
157 <dd><a href=
"__builtin__.html#object">__builtin__.object
</a></dd>
160 Data descriptors defined here:
<br>
161 <dl><dt><strong>__weakref__
</strong></dt>
162 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
165 Methods inherited from
<a href=
"exceptions.html#Exception">exceptions.Exception
</a>:
<br>
166 <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>
169 Data and other attributes inherited from
<a href=
"exceptions.html#Exception">exceptions.Exception
</a>:
<br>
170 <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>
173 Methods inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
174 <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>
176 <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>
178 <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>
180 <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>
182 Use
of
negative
indices
is
not
supported.
</tt></dd></dl>
184 <dl><dt><a name=
"PageActionNotSupported-__reduce__"><strong>__reduce__
</strong></a>(...)
</dt></dl>
186 <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>
188 <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>
190 <dl><dt><a name=
"PageActionNotSupported-__setstate__"><strong>__setstate__
</strong></a>(...)
</dt></dl>
192 <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>
194 <dl><dt><a name=
"PageActionNotSupported-__unicode__"><strong>__unicode__
</strong></a>(...)
</dt></dl>
197 Data descriptors inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
198 <dl><dt><strong>__dict__
</strong></dt>
200 <dl><dt><strong>args
</strong></dt>
202 <dl><dt><strong>message
</strong></dt>
204 </td></tr></table></td></tr></table>