| OLD | NEW |
| (Empty) | |
| 1 |
| 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 <html><head><title>Python: module telemetry.core.tab</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 hre
f="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry
.core.html"><font color="#ffffff">core</font></a>.tab</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=
"file:/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/core/tab.py">/User
s/nduca/Local/chrome/src/tools/telemetry/telemetry/core/tab.py</a></font></td></
tr></table> |
| 12 <p><tt># Copyright (c) 2012 The Chromium Autho
rs. 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=t
op><a href="telemetry.core.web_contents.html">telemetry.core.web_contents</a><br
> |
| 23 </td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="
25%" valign=top></td></tr></table></td></tr></table><p> |
| 24 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 25 <tr bgcolor="#ee77aa"> |
| 26 <td colspan=3 valign=bottom> <br> |
| 27 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big
></font></td></tr> |
| 28 |
| 29 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td>
</td> |
| 30 <td width="100%"><dl> |
| 31 <dt><font face="helvetica, arial"><a href="telemetry.core.web_contents.html#WebC
ontents">telemetry.core.web_contents.WebContents</a>(<a href="__builtin__.html#o
bject">__builtin__.object</a>) |
| 32 </font></dt><dd> |
| 33 <dl> |
| 34 <dt><font face="helvetica, arial"><a href="telemetry.core.tab.html#Tab">Tab</a> |
| 35 </font></dt></dl> |
| 36 </dd> |
| 37 </dl> |
| 38 <p> |
| 39 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 40 <tr bgcolor="#ffc8d8"> |
| 41 <td colspan=3 valign=bottom> <br> |
| 42 <font color="#000000" face="helvetica, arial"><a name="Tab">class <strong>Tab</s
trong></a>(<a href="telemetry.core.web_contents.html#WebContents">telemetry.core
.web_contents.WebContents</a>)</font></td></tr> |
| 43 |
| 44 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 45 <td colspan=2><tt>Represents a tab in the browser<br> |
| 46 <br> |
| 47 The important parts of the <a href="#Tab">Tab</a>
object are in the runtime and page objects.<b
r> |
| 48 E.g.:<br> |
| 49 # Navigates the tab to a g
iven url.<br> |
| 50 tab.<a href="#Tab-Navigate">Navigate</a>('<a href="http:
//www.google.com/">http://www.google.com/</a>')<br> |
| 51 <br> |
| 52 # Evaluates 1+1 in the tab's&nb
sp;JavaScript context.<br> |
| 53 tab.Evaluate('1+1')<br> </tt></td></tr> |
| 54 <tr><td> </td> |
| 55 <td width="100%"><dl><dt>Method resolution order:</dt> |
| 56 <dd><a href="telemetry.core.tab.html#Tab">Tab</a></dd> |
| 57 <dd><a href="telemetry.core.web_contents.html#WebContents">telemetry.core.web_co
ntents.WebContents</a></dd> |
| 58 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 59 </dl> |
| 60 <hr> |
| 61 Methods defined here:<br> |
| 62 <dl><dt><a name="Tab-Activate"><strong>Activate</strong></a>(self)</dt><dd><tt>B
rings this tab to the foreground asynchronously.<b
r> |
| 63 <br> |
| 64 Not all browsers or browser versions support
this method.<br> |
| 65 Be sure to check browser.supports_tab_control.<br> |
| 66 <br> |
| 67 Please note: this is asynchronous. There is a
delay between this call<br> |
| 68 and the page's documentVisibilityState becoming 'visibl
e', and yet more<br> |
| 69 delay until the actual tab is visible to 
;the user. None of these delays<br> |
| 70 are included in this call.</tt></dd></dl> |
| 71 |
| 72 <dl><dt><a name="Tab-CollectGarbage"><strong>CollectGarbage</strong></a>(self)</
dt></dl> |
| 73 |
| 74 <dl><dt><a name="Tab-GetCookieByName"><strong>GetCookieByName</strong></a>(self,
name, timeout<font color="#909090">=60</font>)</dt><dd><tt>Returns the&nbs
p;value of the cookie by the given |name|.</t
t></dd></dl> |
| 75 |
| 76 <dl><dt><a name="Tab-Navigate"><strong>Navigate</strong></a>(self, url, script_t
o_evaluate_on_commit<font color="#909090">=None</font>, timeout<font color="#909
090">=60</font>)</dt><dd><tt>Navigates to url.<br> |
| 77 <br> |
| 78 If |script_to_evaluate_on_commit| is given, the script&
nbsp;source string will be<br> |
| 79 evaluated when the navigation is committed. This&n
bsp;is after the context of<br> |
| 80 the page exists, but before any script on&nbs
p;the page itself has executed.</tt></dd></dl> |
| 81 |
| 82 <dl><dt><a name="Tab-PerformActionAndWaitForNavigate"><strong>PerformActionAndWa
itForNavigate</strong></a>(self, action_function, timeout<font color="#909090">=
60</font>)</dt><dd><tt>Executes action_function, and waits f
or the navigation to complete.<br> |
| 83 <br> |
| 84 action_function must be a Python function that&nbs
p;results in a navigation.<br> |
| 85 This function returns when the navigation is
complete or when<br> |
| 86 the timeout has been exceeded.</tt></dd></dl> |
| 87 |
| 88 <dl><dt><a name="Tab-Screenshot"><strong>Screenshot</strong></a>(self, timeout<f
ont color="#909090">=60</font>)</dt><dd><tt>Capture a screenshot
of the window for rendering validation</tt></dd></dl> |
| 89 |
| 90 <dl><dt><a name="Tab-__del__"><strong>__del__</strong></a>(self)</dt></dl> |
| 91 |
| 92 <dl><dt><a name="Tab-__init__"><strong>__init__</strong></a>(self, inspector_bac
kend)</dt></dl> |
| 93 |
| 94 <hr> |
| 95 Data descriptors defined here:<br> |
| 96 <dl><dt><strong>browser</strong></dt> |
| 97 <dd><tt>The browser in which this tab resides.</tt
></dd> |
| 98 </dl> |
| 99 <dl><dt><strong>dom_stats</strong></dt> |
| 100 <dd><tt>A dictionary populated with measured DOM s
tatistics.<br> |
| 101 <br> |
| 102 Currently this dictionary contains:<br> |
| 103 {<br> |
| 104 'document_count': integer,<br> |
| 105 'node_count': integer,<br> |
| 106 'event_listener_count': integer<br> |
| 107 }</tt></dd> |
| 108 </dl> |
| 109 <dl><dt><strong>screenshot_supported</strong></dt> |
| 110 <dd><tt>True if the browser instance is capable&nb
sp;of capturing screenshots</tt></dd> |
| 111 </dl> |
| 112 <dl><dt><strong>url</strong></dt> |
| 113 </dl> |
| 114 <hr> |
| 115 Methods inherited from <a href="telemetry.core.web_contents.html#WebContents">te
lemetry.core.web_contents.WebContents</a>:<br> |
| 116 <dl><dt><a name="Tab-Close"><strong>Close</strong></a>(self)</dt><dd><tt>Closes&
nbsp;this page.<br> |
| 117 <br> |
| 118 Not all browsers or browser versions support
this method.<br> |
| 119 Be sure to check browser.supports_tab_control.</tt></dd></dl
> |
| 120 |
| 121 <dl><dt><a name="Tab-Disconnect"><strong>Disconnect</strong></a>(self)</dt></dl> |
| 122 |
| 123 <dl><dt><a name="Tab-EvaluateJavaScript"><strong>EvaluateJavaScript</strong></a>
(self, expr, timeout<font color="#909090">=60</font>)</dt><dd><tt>Evalutes
expr in JavaScript and returns the JSONized r
esult.<br> |
| 124 <br> |
| 125 Consider using ExecuteJavaScript for cases where t
he result of the<br> |
| 126 expression is not needed.<br> |
| 127 <br> |
| 128 If evaluation throws in JavaScript, a Python
EvaluateException will<br> |
| 129 be raised.<br> |
| 130 <br> |
| 131 If the result of the evaluation cannot be&nbs
p;JSONized, then an<br> |
| 132 EvaluationException will be raised.</tt></dd></dl> |
| 133 |
| 134 <dl><dt><a name="Tab-ExecuteJavaScript"><strong>ExecuteJavaScript</strong></a>(s
elf, expr, timeout<font color="#909090">=60</font>)</dt><dd><tt>Executes ex
pr in JavaScript. Does not return the result.
<br> |
| 135 <br> |
| 136 If the expression failed to evaluate, EvaluateExce
ption will be raised.</tt></dd></dl> |
| 137 |
| 138 <dl><dt><a name="Tab-StartTimelineRecording"><strong>StartTimelineRecording</str
ong></a>(self)</dt></dl> |
| 139 |
| 140 <dl><dt><a name="Tab-StopTimelineRecording"><strong>StopTimelineRecording</stron
g></a>(self)</dt></dl> |
| 141 |
| 142 <dl><dt><a name="Tab-WaitForDocumentReadyStateToBeComplete"><strong>WaitForDocum
entReadyStateToBeComplete</strong></a>(self, timeout<font color="#909090">=60</f
ont>)</dt></dl> |
| 143 |
| 144 <dl><dt><a name="Tab-WaitForDocumentReadyStateToBeInteractiveOrBetter"><strong>W
aitForDocumentReadyStateToBeInteractiveOrBetter</strong></a>(self, timeout<font
color="#909090">=60</font>)</dt></dl> |
| 145 |
| 146 <hr> |
| 147 Data descriptors inherited from <a href="telemetry.core.web_contents.html#WebCon
tents">telemetry.core.web_contents.WebContents</a>:<br> |
| 148 <dl><dt><strong>__dict__</strong></dt> |
| 149 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> |
| 150 </dl> |
| 151 <dl><dt><strong>__weakref__</strong></dt> |
| 152 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> |
| 153 </dl> |
| 154 <dl><dt><strong>message_output_stream</strong></dt> |
| 155 </dl> |
| 156 <dl><dt><strong>timeline_model</strong></dt> |
| 157 </dl> |
| 158 </td></tr></table></td></tr></table><p> |
| 159 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 160 <tr bgcolor="#55aa55"> |
| 161 <td colspan=3 valign=bottom> <br> |
| 162 <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></
font></td></tr> |
| 163 |
| 164 <tr><td bgcolor="#55aa55"><tt> </tt></td><td>
</td> |
| 165 <td width="100%"><strong>DEFAULT_TAB_TIMEOUT</strong> = 60</td></tr></table> |
| 166 </body></html> |
| OLD | NEW |