2 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
3 <html><head><title>Python: module telemetry.internal.actions.page_action
</title>
5 </head><body bgcolor=
"#f0f0f8">
7 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"heading">
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>.page_action
</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/page_action.py">telemetry/internal/actions/page_action.py
</a></font></td></tr></table>
13 <p><tt>#
Copyright
2012 The
Chromium
Authors.
All
rights
reserved.
<br>
14 #
Use
of
this
source
code
is
governed
by
a
BSD-style
license
that
can
be
<br>
15 #
found
in
the
LICENSE
file.
</tt></p>
17 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
18 <tr bgcolor=
"#aa55cc">
19 <td colspan=
3 valign=bottom
> <br>
20 <font color=
"#ffffff" face=
"helvetica, arial"><big><strong>Modules
</strong></big></font></td></tr>
22 <tr><td bgcolor=
"#aa55cc"><tt> </tt></td><td> </td>
23 <td width=
"100%"><table width=
"100%" summary=
"list"><tr><td width=
"25%" valign=top
><a href=
"telemetry.decorators.html">telemetry.decorators
</a><br>
24 </td><td width=
"25%" valign=top
><a href=
"re.html">re
</a><br>
25 </td><td width=
"25%" valign=top
></td><td width=
"25%" valign=top
></td></tr></table></td></tr></table><p>
26 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
27 <tr bgcolor=
"#ee77aa">
28 <td colspan=
3 valign=bottom
> <br>
29 <font color=
"#ffffff" face=
"helvetica, arial"><big><strong>Classes
</strong></big></font></td></tr>
31 <tr><td bgcolor=
"#ee77aa"><tt> </tt></td><td> </td>
33 <dt><font face=
"helvetica, arial"><a href=
"__builtin__.html#object">__builtin__.object
</a>
36 <dt><font face=
"helvetica, arial"><a href=
"telemetry.internal.actions.page_action.html#PageAction">PageAction
</a>
39 <dt><font face=
"helvetica, arial"><a href=
"exceptions.html#Exception">exceptions.Exception
</a>(
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>)
42 <dt><font face=
"helvetica, arial"><a href=
"telemetry.internal.actions.page_action.html#PageActionFailed">PageActionFailed
</a>
43 </font></dt><dt><font face=
"helvetica, arial"><a href=
"telemetry.internal.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-CleanUp"><strong>CleanUp
</strong></a>(self, tab)
</dt></dl>
59 <dl><dt><a name=
"PageAction-RunAction"><strong>RunAction
</strong></a>(self, tab)
</dt></dl>
61 <dl><dt><a name=
"PageAction-WillRunAction"><strong>WillRunAction
</strong></a>(self, tab)
</dt><dd><tt>Override
to
do
action-specific
setup
before
<br>
62 Test.WillRunAction
is
called.
</tt></dd></dl>
65 Data descriptors defined here:
<br>
66 <dl><dt><strong>__dict__
</strong></dt>
67 <dd><tt>dictionary
for
instance
variables
(if
defined)
</tt></dd>
69 <dl><dt><strong>__weakref__
</strong></dt>
70 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
72 </td></tr></table> <p>
73 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
74 <tr bgcolor=
"#ffc8d8">
75 <td colspan=
3 valign=bottom
> <br>
76 <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>
78 <tr><td bgcolor=
"#ffc8d8"><tt> </tt></td><td> </td>
79 <td width=
"100%"><dl><dt>Method resolution order:
</dt>
80 <dd><a href=
"telemetry.internal.actions.page_action.html#PageActionFailed">PageActionFailed
</a></dd>
81 <dd><a href=
"exceptions.html#Exception">exceptions.Exception
</a></dd>
82 <dd><a href=
"exceptions.html#BaseException">exceptions.BaseException
</a></dd>
83 <dd><a href=
"__builtin__.html#object">__builtin__.object
</a></dd>
86 Data descriptors defined here:
<br>
87 <dl><dt><strong>__weakref__
</strong></dt>
88 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
91 Methods inherited from
<a href=
"exceptions.html#Exception">exceptions.Exception
</a>:
<br>
92 <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>
95 Data and other attributes inherited from
<a href=
"exceptions.html#Exception">exceptions.Exception
</a>:
<br>
96 <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>
99 Methods inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
100 <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>
102 <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>
104 <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>
106 <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>
108 Use
of
negative
indices
is
not
supported.
</tt></dd></dl>
110 <dl><dt><a name=
"PageActionFailed-__reduce__"><strong>__reduce__
</strong></a>(...)
</dt></dl>
112 <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>
114 <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>
116 <dl><dt><a name=
"PageActionFailed-__setstate__"><strong>__setstate__
</strong></a>(...)
</dt></dl>
118 <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>
120 <dl><dt><a name=
"PageActionFailed-__unicode__"><strong>__unicode__
</strong></a>(...)
</dt></dl>
123 Data descriptors inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
124 <dl><dt><strong>__dict__
</strong></dt>
126 <dl><dt><strong>args
</strong></dt>
128 <dl><dt><strong>message
</strong></dt>
130 </td></tr></table> <p>
131 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
132 <tr bgcolor=
"#ffc8d8">
133 <td colspan=
3 valign=bottom
> <br>
134 <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>
136 <tr><td bgcolor=
"#ffc8d8"><tt> </tt></td><td> </td>
137 <td width=
"100%"><dl><dt>Method resolution order:
</dt>
138 <dd><a href=
"telemetry.internal.actions.page_action.html#PageActionNotSupported">PageActionNotSupported
</a></dd>
139 <dd><a href=
"exceptions.html#Exception">exceptions.Exception
</a></dd>
140 <dd><a href=
"exceptions.html#BaseException">exceptions.BaseException
</a></dd>
141 <dd><a href=
"__builtin__.html#object">__builtin__.object
</a></dd>
144 Data descriptors defined here:
<br>
145 <dl><dt><strong>__weakref__
</strong></dt>
146 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
149 Methods inherited from
<a href=
"exceptions.html#Exception">exceptions.Exception
</a>:
<br>
150 <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>
153 Data and other attributes inherited from
<a href=
"exceptions.html#Exception">exceptions.Exception
</a>:
<br>
154 <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>
157 Methods inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
158 <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>
160 <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>
162 <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>
164 <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>
166 Use
of
negative
indices
is
not
supported.
</tt></dd></dl>
168 <dl><dt><a name=
"PageActionNotSupported-__reduce__"><strong>__reduce__
</strong></a>(...)
</dt></dl>
170 <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>
172 <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>
174 <dl><dt><a name=
"PageActionNotSupported-__setstate__"><strong>__setstate__
</strong></a>(...)
</dt></dl>
176 <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>
178 <dl><dt><a name=
"PageActionNotSupported-__unicode__"><strong>__unicode__
</strong></a>(...)
</dt></dl>
181 Data descriptors inherited from
<a href=
"exceptions.html#BaseException">exceptions.BaseException
</a>:
<br>
182 <dl><dt><strong>__dict__
</strong></dt>
184 <dl><dt><strong>args
</strong></dt>
186 <dl><dt><strong>message
</strong></dt>
188 </td></tr></table></td></tr></table><p>
189 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
190 <tr bgcolor=
"#eeaa77">
191 <td colspan=
3 valign=bottom
> <br>
192 <font color=
"#ffffff" face=
"helvetica, arial"><big><strong>Functions
</strong></big></font></td></tr>
194 <tr><td bgcolor=
"#eeaa77"><tt> </tt></td><td> </td>
195 <td width=
"100%"><dl><dt><a name=
"-EvaluateCallbackWithElement"><strong>EvaluateCallbackWithElement
</strong></a>(tab, callback_js, selector
<font color=
"#909090">=None
</font>, text
<font color=
"#909090">=None
</font>, element_function
<font color=
"#909090">=None
</font>, wait
<font color=
"#909090">=False
</font>, timeout_in_seconds
<font color=
"#909090">=
60</font>)
</dt><dd><tt>Evaluates
the
JavaScript
callback
with
the
given
element.
<br>
197 The
element
may
be
selected
via
selector,
text,
or
element_function.
<br>
198 Only
one
of
these
arguments
must
be
specified.
<br>
201 The
callback's
return
value,
if
any.
The
return
value
must
be
<br>
202 convertible
to
JSON.
<br>
205 tab:
A
telemetry.core.Tab
<a href=
"__builtin__.html#object">object
</a>.
<br>
206 callback_js:
The
JavaScript
callback
to
call
(as
string).
<br>
207 The
callback
receive
2 parameters:
the
element,
and
information
<br>
208 string
about
what
method
was
used
to
retrieve
the
element.
<br>
209 Example:
'''
<br>
210 function(element,
info)
{
<br>
211 if
(!element)
{
<br>
212 throw
Error('Can
not
find
element:
'
+
info);
<br>
213 }
<br>
214 element.click()
<br>
215 }'''
<br>
216 selector:
A
CSS
selector
describing
the
element.
<br>
217 text:
The
element
must
contains
this
exact
text.
<br>
218 element_function:
A
JavaScript
function
(as
string)
that
is
used
<br>
219 to
retrieve
the
element.
For
example:
<br>
220 '(function()
{
return
foo.element;
})()'.
<br>
221 wait:
Whether
to
wait
for
the
return
value
to
be
true.
<br>
222 timeout_in_seconds:
The
timeout
for
wait
(if
waiting).
</tt></dd></dl>
223 <dl><dt><a name=
"-IsGestureSourceTypeSupported"><strong>IsGestureSourceTypeSupported
</strong></a>(*args, **kwargs)
</dt></dl>
224 </td></tr></table><p>
225 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
226 <tr bgcolor=
"#55aa55">
227 <td colspan=
3 valign=bottom
> <br>
228 <font color=
"#ffffff" face=
"helvetica, arial"><big><strong>Data
</strong></big></font></td></tr>
230 <tr><td bgcolor=
"#55aa55"><tt> </tt></td><td> </td>
231 <td width=
"100%"><strong>GESTURE_SOURCE_DEFAULT
</strong> = 'DEFAULT'
<br>
232 <strong>GESTURE_SOURCE_MOUSE
</strong> = 'MOUSE'
<br>
233 <strong>GESTURE_SOURCE_TOUCH
</strong> = 'TOUCH'
<br>
234 <strong>SUPPORTED_GESTURE_SOURCES
</strong> = ('DEFAULT', 'MOUSE', 'TOUCH')
</td></tr></table>