Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
2182 lines (2170 sloc) 426 KB
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>selenium</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th bgcolor="#70b0f0" class="navselect"
>&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
Module&nbsp;selenium
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript: void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="selenium-pysrc.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h2 class="py-src">Source Code for <a href="selenium-module.html">Module selenium</a></h2>
<div class="py-src">
<pre class="py-src">
<span class="lineno"> 1</span> <span class="py-line"> </span>
<span class="lineno"> 2</span> <span class="py-line"><span class="py-docstring">"""</span> </span>
<span class="lineno"> 3</span> <span class="py-line"><span class="py-docstring">Copyright 2006 ThoughtWorks, Inc.</span> </span>
<span class="lineno"> 4</span> <span class="py-line"><span class="py-docstring"></span> </span>
<span class="lineno"> 5</span> <span class="py-line"><span class="py-docstring">Licensed under the Apache License, Version 2.0 (the "License");</span> </span>
<span class="lineno"> 6</span> <span class="py-line"><span class="py-docstring">you may not use this file except in compliance with the License.</span> </span>
<span class="lineno"> 7</span> <span class="py-line"><span class="py-docstring">You may obtain a copy of the License at</span> </span>
<span class="lineno"> 8</span> <span class="py-line"><span class="py-docstring"></span> </span>
<span class="lineno"> 9</span> <span class="py-line"><span class="py-docstring"> http://www.apache.org/licenses/LICENSE-2.0</span> </span>
<span class="lineno"> 10</span> <span class="py-line"><span class="py-docstring"></span> </span>
<span class="lineno"> 11</span> <span class="py-line"><span class="py-docstring">Unless required by applicable law or agreed to in writing, software</span> </span>
<span class="lineno"> 12</span> <span class="py-line"><span class="py-docstring">distributed under the License is distributed on an "AS IS" BASIS,</span> </span>
<span class="lineno"> 13</span> <span class="py-line"><span class="py-docstring">WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> </span>
<span class="lineno"> 14</span> <span class="py-line"><span class="py-docstring">See the License for the specific language governing permissions and</span> </span>
<span class="lineno"> 15</span> <span class="py-line"><span class="py-docstring">limitations under the License.</span> </span>
<span class="lineno"> 16</span> <span class="py-line"><span class="py-docstring">"""</span> </span>
<span class="lineno"> 17</span> <span class="py-line"><span class="py-name">__docformat__</span> <span class="py-op">=</span> <span class="py-string">"restructuredtext en"</span> </span>
<span class="lineno"> 18</span> <span class="py-line"> </span>
<span class="lineno"> 19</span> <span class="py-line"><span class="py-comment"># This file has been automatically generated via XSL</span> </span>
<span class="lineno"> 20</span> <span class="py-line"><span class="py-comment"></span> </span>
<span class="lineno"> 21</span> <span class="py-line"><span class="py-keyword">import</span> <span class="py-name">httplib</span> </span>
<span class="lineno"> 22</span> <span class="py-line"><span class="py-keyword">import</span> <span class="py-name">urllib</span> </span>
<span class="lineno"> 23</span> <span class="py-line"><span class="py-keyword">import</span> <span class="py-name">re</span> </span>
<span class="lineno"> 24</span> <span class="py-line"> </span>
<a name="selenium"></a><div id="selenium-def"><span class="lineno"> 25</span> <a class="pysrc-toggle" href="#" id="selenium-toggle" onclick="toggle('selenium'); return false;">-</a><span class="py-line"><span class="py-keyword">class</span> <a class="py-def-name" href="selenium.selenium-class.html">selenium</a><span class="py-op">:</span> </span>
</div><div id="selenium-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="selenium-expanded"><span class="lineno"> 26</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 27</span> <span class="py-line"><span class="py-docstring"> Defines an object that runs Selenium commands.</span> </span>
<span class="lineno"> 28</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 29</span> <span class="py-line"><span class="py-docstring"> Element Locators</span> </span>
<span class="lineno"> 30</span> <span class="py-line"><span class="py-docstring"> ~~~~~~~~~~~~~~~~</span> </span>
<span class="lineno"> 31</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 32</span> <span class="py-line"><span class="py-docstring"> Element Locators tell Selenium which HTML element a command refers to.</span> </span>
<span class="lineno"> 33</span> <span class="py-line"><span class="py-docstring"> The format of a locator is:</span> </span>
<span class="lineno"> 34</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 35</span> <span class="py-line"><span class="py-docstring"> \ *locatorType*\ **=**\ \ *argument*</span> </span>
<span class="lineno"> 36</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 37</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 38</span> <span class="py-line"><span class="py-docstring"> We support the following strategies for locating elements:</span> </span>
<span class="lineno"> 39</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 40</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 41</span> <span class="py-line"><span class="py-docstring"> * \ **identifier**\ =\ *id*: </span> </span>
<span class="lineno"> 42</span> <span class="py-line"><span class="py-docstring"> Select the element with the specified @id attribute. If no match is</span> </span>
<span class="lineno"> 43</span> <span class="py-line"><span class="py-docstring"> found, select the first element whose @name attribute is \ *id*.</span> </span>
<span class="lineno"> 44</span> <span class="py-line"><span class="py-docstring"> (This is normally the default; see below.)</span> </span>
<span class="lineno"> 45</span> <span class="py-line"><span class="py-docstring"> * \ **id**\ =\ *id*:</span> </span>
<span class="lineno"> 46</span> <span class="py-line"><span class="py-docstring"> Select the element with the specified @id attribute.</span> </span>
<span class="lineno"> 47</span> <span class="py-line"><span class="py-docstring"> * \ **name**\ =\ *name*:</span> </span>
<span class="lineno"> 48</span> <span class="py-line"><span class="py-docstring"> Select the first element with the specified @name attribute.</span> </span>
<span class="lineno"> 49</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 50</span> <span class="py-line"><span class="py-docstring"> * username</span> </span>
<span class="lineno"> 51</span> <span class="py-line"><span class="py-docstring"> * name=username</span> </span>
<span class="lineno"> 52</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 53</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 54</span> <span class="py-line"><span class="py-docstring"> The name may optionally be followed by one or more \ *element-filters*, separated from the name by whitespace. If the \ *filterType* is not specified, \ **value**\ is assumed.</span> </span>
<span class="lineno"> 55</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 56</span> <span class="py-line"><span class="py-docstring"> * name=flavour value=chocolate</span> </span>
<span class="lineno"> 57</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 58</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 59</span> <span class="py-line"><span class="py-docstring"> * \ **dom**\ =\ *javascriptExpression*: </span> </span>
<span class="lineno"> 60</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 61</span> <span class="py-line"><span class="py-docstring"> Find an element by evaluating the specified string. This allows you to traverse the HTML Document Object</span> </span>
<span class="lineno"> 62</span> <span class="py-line"><span class="py-docstring"> Model using JavaScript. Note that you must not return a value in this string; simply make it the last expression in the block.</span> </span>
<span class="lineno"> 63</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 64</span> <span class="py-line"><span class="py-docstring"> * dom=document.forms['myForm'].myDropdown</span> </span>
<span class="lineno"> 65</span> <span class="py-line"><span class="py-docstring"> * dom=document.images[56]</span> </span>
<span class="lineno"> 66</span> <span class="py-line"><span class="py-docstring"> * dom=function foo() { return document.links[1]; }; foo();</span> </span>
<span class="lineno"> 67</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 68</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 69</span> <span class="py-line"><span class="py-docstring"> * \ **xpath**\ =\ *xpathExpression*: </span> </span>
<span class="lineno"> 70</span> <span class="py-line"><span class="py-docstring"> Locate an element using an XPath expression.</span> </span>
<span class="lineno"> 71</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 72</span> <span class="py-line"><span class="py-docstring"> * xpath=//img[@alt='The image alt text']</span> </span>
<span class="lineno"> 73</span> <span class="py-line"><span class="py-docstring"> * xpath=//table[@id='table1']//tr[4]/td[2]</span> </span>
<span class="lineno"> 74</span> <span class="py-line"><span class="py-docstring"> * xpath=//a[contains(@href,'#id1')]</span> </span>
<span class="lineno"> 75</span> <span class="py-line"><span class="py-docstring"> * xpath=//a[contains(@href,'#id1')]/@class</span> </span>
<span class="lineno"> 76</span> <span class="py-line"><span class="py-docstring"> * xpath=(//table[@class='stylee'])//th[text()='theHeaderText']/../td</span> </span>
<span class="lineno"> 77</span> <span class="py-line"><span class="py-docstring"> * xpath=//input[@name='name2' and @value='yes']</span> </span>
<span class="lineno"> 78</span> <span class="py-line"><span class="py-docstring"> * xpath=//\*[text()="right"]</span> </span>
<span class="lineno"> 79</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 80</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 81</span> <span class="py-line"><span class="py-docstring"> * \ **link**\ =\ *textPattern*:</span> </span>
<span class="lineno"> 82</span> <span class="py-line"><span class="py-docstring"> Select the link (anchor) element which contains text matching the</span> </span>
<span class="lineno"> 83</span> <span class="py-line"><span class="py-docstring"> specified \ *pattern*.</span> </span>
<span class="lineno"> 84</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 85</span> <span class="py-line"><span class="py-docstring"> * link=The link text</span> </span>
<span class="lineno"> 86</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 87</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 88</span> <span class="py-line"><span class="py-docstring"> * \ **css**\ =\ *cssSelectorSyntax*:</span> </span>
<span class="lineno"> 89</span> <span class="py-line"><span class="py-docstring"> Select the element using css selectors. Please refer to CSS2 selectors, CSS3 selectors for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package.</span> </span>
<span class="lineno"> 90</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 91</span> <span class="py-line"><span class="py-docstring"> * css=a[href="#id3"]</span> </span>
<span class="lineno"> 92</span> <span class="py-line"><span class="py-docstring"> * css=span#firstChild + span</span> </span>
<span class="lineno"> 93</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 94</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 95</span> <span class="py-line"><span class="py-docstring"> Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after). </span> </span>
<span class="lineno"> 96</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 97</span> <span class="py-line"><span class="py-docstring"> * \ **ui**\ =\ *uiSpecifierString*:</span> </span>
<span class="lineno"> 98</span> <span class="py-line"><span class="py-docstring"> Locate an element by resolving the UI specifier string to another locator, and evaluating it. See the Selenium UI-Element Reference for more details.</span> </span>
<span class="lineno"> 99</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 100</span> <span class="py-line"><span class="py-docstring"> * ui=loginPages::loginButton()</span> </span>
<span class="lineno"> 101</span> <span class="py-line"><span class="py-docstring"> * ui=settingsPages::toggle(label=Hide Email)</span> </span>
<span class="lineno"> 102</span> <span class="py-line"><span class="py-docstring"> * ui=forumPages::postBody(index=2)//a[2]</span> </span>
<span class="lineno"> 103</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 104</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 105</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 106</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 107</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 108</span> <span class="py-line"><span class="py-docstring"> Without an explicit locator prefix, Selenium uses the following default</span> </span>
<span class="lineno"> 109</span> <span class="py-line"><span class="py-docstring"> strategies:</span> </span>
<span class="lineno"> 110</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 111</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 112</span> <span class="py-line"><span class="py-docstring"> * \ **dom**\ , for locators starting with "document."</span> </span>
<span class="lineno"> 113</span> <span class="py-line"><span class="py-docstring"> * \ **xpath**\ , for locators starting with "//"</span> </span>
<span class="lineno"> 114</span> <span class="py-line"><span class="py-docstring"> * \ **identifier**\ , otherwise</span> </span>
<span class="lineno"> 115</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 116</span> <span class="py-line"><span class="py-docstring"> Element Filters</span> </span>
<span class="lineno"> 117</span> <span class="py-line"><span class="py-docstring"> ~~~~~~~~~~~~~~~</span> </span>
<span class="lineno"> 118</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 119</span> <span class="py-line"><span class="py-docstring"> Element filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator.</span> </span>
<span class="lineno"> 120</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 121</span> <span class="py-line"><span class="py-docstring"> Filters look much like locators, ie.</span> </span>
<span class="lineno"> 122</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 123</span> <span class="py-line"><span class="py-docstring"> \ *filterType*\ **=**\ \ *argument*</span> </span>
<span class="lineno"> 124</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 125</span> <span class="py-line"><span class="py-docstring"> Supported element-filters are:</span> </span>
<span class="lineno"> 126</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 127</span> <span class="py-line"><span class="py-docstring"> \ **value=**\ \ *valuePattern*</span> </span>
<span class="lineno"> 128</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 129</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 130</span> <span class="py-line"><span class="py-docstring"> Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons.</span> </span>
<span class="lineno"> 131</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 132</span> <span class="py-line"><span class="py-docstring"> \ **index=**\ \ *index*</span> </span>
<span class="lineno"> 133</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 134</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 135</span> <span class="py-line"><span class="py-docstring"> Selects a single element based on its position in the list (offset from zero).</span> </span>
<span class="lineno"> 136</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 137</span> <span class="py-line"><span class="py-docstring"> String-match Patterns</span> </span>
<span class="lineno"> 138</span> <span class="py-line"><span class="py-docstring"> ~~~~~~~~~~~~~~~~~~~~~</span> </span>
<span class="lineno"> 139</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 140</span> <span class="py-line"><span class="py-docstring"> Various Pattern syntaxes are available for matching string values:</span> </span>
<span class="lineno"> 141</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 142</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 143</span> <span class="py-line"><span class="py-docstring"> * \ **glob:**\ \ *pattern*:</span> </span>
<span class="lineno"> 144</span> <span class="py-line"><span class="py-docstring"> Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a</span> </span>
<span class="lineno"> 145</span> <span class="py-line"><span class="py-docstring"> kind of limited regular-expression syntax typically used in command-line</span> </span>
<span class="lineno"> 146</span> <span class="py-line"><span class="py-docstring"> shells. In a glob pattern, "\*" represents any sequence of characters, and "?"</span> </span>
<span class="lineno"> 147</span> <span class="py-line"><span class="py-docstring"> represents any single character. Glob patterns match against the entire</span> </span>
<span class="lineno"> 148</span> <span class="py-line"><span class="py-docstring"> string.</span> </span>
<span class="lineno"> 149</span> <span class="py-line"><span class="py-docstring"> * \ **regexp:**\ \ *regexp*:</span> </span>
<span class="lineno"> 150</span> <span class="py-line"><span class="py-docstring"> Match a string using a regular-expression. The full power of JavaScript</span> </span>
<span class="lineno"> 151</span> <span class="py-line"><span class="py-docstring"> regular-expressions is available.</span> </span>
<span class="lineno"> 152</span> <span class="py-line"><span class="py-docstring"> * \ **regexpi:**\ \ *regexpi*:</span> </span>
<span class="lineno"> 153</span> <span class="py-line"><span class="py-docstring"> Match a string using a case-insensitive regular-expression.</span> </span>
<span class="lineno"> 154</span> <span class="py-line"><span class="py-docstring"> * \ **exact:**\ \ *string*:</span> </span>
<span class="lineno"> 155</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 156</span> <span class="py-line"><span class="py-docstring"> Match a string exactly, verbatim, without any of that fancy wildcard</span> </span>
<span class="lineno"> 157</span> <span class="py-line"><span class="py-docstring"> stuff.</span> </span>
<span class="lineno"> 158</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 159</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 160</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 161</span> <span class="py-line"><span class="py-docstring"> If no pattern prefix is specified, Selenium assumes that it's a "glob"</span> </span>
<span class="lineno"> 162</span> <span class="py-line"><span class="py-docstring"> pattern.</span> </span>
<span class="lineno"> 163</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 164</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 165</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 166</span> <span class="py-line"><span class="py-docstring"> For commands that return multiple values (such as verifySelectOptions),</span> </span>
<span class="lineno"> 167</span> <span class="py-line"><span class="py-docstring"> the string being matched is a comma-separated list of the return values,</span> </span>
<span class="lineno"> 168</span> <span class="py-line"><span class="py-docstring"> where both commas and backslashes in the values are backslash-escaped.</span> </span>
<span class="lineno"> 169</span> <span class="py-line"><span class="py-docstring"> When providing a pattern, the optional matching syntax (i.e. glob,</span> </span>
<span class="lineno"> 170</span> <span class="py-line"><span class="py-docstring"> regexp, etc.) is specified once, as usual, at the beginning of the</span> </span>
<span class="lineno"> 171</span> <span class="py-line"><span class="py-docstring"> pattern.</span> </span>
<span class="lineno"> 172</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 173</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 174</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 175</span> <span class="py-line"> </span>
<span class="lineno"> 176</span> <span class="py-line"><span class="py-comment">### This part is hard-coded in the XSL</span> </span>
<a name="selenium.__init__"></a><div id="selenium.__init__-def"><span class="lineno"> 177</span> <a class="pysrc-toggle" href="#" id="selenium.__init__-toggle" onclick="toggle('selenium.__init__'); return false;">-</a><span class="py-line"><span class="py-comment"></span> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#__init__">__init__</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">host</span><span class="py-op">,</span> <span class="py-param">port</span><span class="py-op">,</span> <span class="py-param">browserStartCommand</span><span class="py-op">,</span> <span class="py-param">browserURL</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.__init__-expanded"><span class="lineno"> 178</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">host</span> <span class="py-op">=</span> <span class="py-name">host</span> </span>
<span class="lineno"> 179</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">port</span> <span class="py-op">=</span> <span class="py-name">port</span> </span>
<span class="lineno"> 180</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">browserStartCommand</span> <span class="py-op">=</span> <span class="py-name">browserStartCommand</span> </span>
<span class="lineno"> 181</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">browserURL</span> <span class="py-op">=</span> <span class="py-name">browserURL</span> </span>
<span class="lineno"> 182</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">sessionId</span> <span class="py-op">=</span> <span class="py-name">None</span> </span>
<span class="lineno"> 183</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">extensionJs</span> <span class="py-op">=</span> <span class="py-string">""</span> </span>
</div><span class="lineno"> 184</span> <span class="py-line"> </span>
<a name="selenium.setExtensionJs"></a><div id="selenium.setExtensionJs-def"><span class="lineno"> 185</span> <a class="pysrc-toggle" href="#" id="selenium.setExtensionJs-toggle" onclick="toggle('selenium.setExtensionJs'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#setExtensionJs">setExtensionJs</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">extensionJs</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.setExtensionJs-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.setExtensionJs-expanded"><span class="lineno"> 186</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">extensionJs</span> <span class="py-op">=</span> <span class="py-name">extensionJs</span> </span>
</div><span class="lineno"> 187</span> <span class="py-line"> </span>
<a name="selenium.start"></a><div id="selenium.start-def"><span class="lineno"> 188</span> <a class="pysrc-toggle" href="#" id="selenium.start-toggle" onclick="toggle('selenium.start'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#start">start</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.start-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.start-expanded"><span class="lineno"> 189</span> <span class="py-line"> <span class="py-name">result</span> <span class="py-op">=</span> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.get_string" class="py-name" href="selenium.selenium-class.html#get_string">get_string</a><span class="py-op">(</span><span class="py-string">"getNewBrowserSession"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">self</span><span class="py-op">.</span><span class="py-name">browserStartCommand</span><span class="py-op">,</span> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">browserURL</span><span class="py-op">,</span> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">extensionJs</span><span class="py-op">]</span><span class="py-op">)</span> </span>
<span class="lineno"> 190</span> <span class="py-line"> <span class="py-keyword">try</span><span class="py-op">:</span> </span>
<span class="lineno"> 191</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">sessionId</span> <span class="py-op">=</span> <span class="py-name">result</span> </span>
<span class="lineno"> 192</span> <span class="py-line"> <span class="py-keyword">except</span> <span class="py-name">ValueError</span><span class="py-op">:</span> </span>
<span class="lineno"> 193</span> <span class="py-line"> <span class="py-keyword">raise</span> <span class="py-name">Exception</span><span class="py-op">,</span> <span class="py-name">result</span> </span>
</div><span class="lineno"> 194</span> <span class="py-line"> </span>
<a name="selenium.stop"></a><div id="selenium.stop-def"><span class="lineno"> 195</span> <a class="pysrc-toggle" href="#" id="selenium.stop-toggle" onclick="toggle('selenium.stop'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#stop">stop</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.stop-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.stop-expanded"><span class="lineno"> 196</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"testComplete"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
<span class="lineno"> 197</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">sessionId</span> <span class="py-op">=</span> <span class="py-name">None</span> </span>
</div><span class="lineno"> 198</span> <span class="py-line"> </span>
<a name="selenium.do_command"></a><div id="selenium.do_command-def"><span class="lineno"> 199</span> <a class="pysrc-toggle" href="#" id="selenium.do_command-toggle" onclick="toggle('selenium.do_command'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">verb</span><span class="py-op">,</span> <span class="py-param">args</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.do_command-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.do_command-expanded"><span class="lineno"> 200</span> <span class="py-line"> <span class="py-name">conn</span> <span class="py-op">=</span> <span class="py-name">httplib</span><span class="py-op">.</span><span class="py-name">HTTPConnection</span><span class="py-op">(</span><span class="py-name">self</span><span class="py-op">.</span><span class="py-name">host</span><span class="py-op">,</span> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">port</span><span class="py-op">)</span> </span>
<span class="lineno"> 201</span> <span class="py-line"> <span class="py-name">body</span> <span class="py-op">=</span> <span class="py-string">u'cmd='</span> <span class="py-op">+</span> <span class="py-name">urllib</span><span class="py-op">.</span><span class="py-name">quote_plus</span><span class="py-op">(</span><span class="py-name">unicode</span><span class="py-op">(</span><span class="py-name">verb</span><span class="py-op">)</span><span class="py-op">.</span><span class="py-name">encode</span><span class="py-op">(</span><span class="py-string">'utf-8'</span><span class="py-op">)</span><span class="py-op">)</span> </span>
<span class="lineno"> 202</span> <span class="py-line"> <span class="py-keyword">for</span> <span class="py-name">i</span> <span class="py-keyword">in</span> <span class="py-name">range</span><span class="py-op">(</span><span class="py-name">len</span><span class="py-op">(</span><span class="py-name">args</span><span class="py-op">)</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 203</span> <span class="py-line"> <span class="py-name">body</span> <span class="py-op">+=</span> <span class="py-string">'&amp;'</span> <span class="py-op">+</span> <span class="py-name">unicode</span><span class="py-op">(</span><span class="py-name">i</span><span class="py-op">+</span><span class="py-number">1</span><span class="py-op">)</span> <span class="py-op">+</span> <span class="py-string">'='</span> <span class="py-op">+</span> <span class="py-name">urllib</span><span class="py-op">.</span><span class="py-name">quote_plus</span><span class="py-op">(</span><span class="py-name">unicode</span><span class="py-op">(</span><span class="py-name">args</span><span class="py-op">[</span><span class="py-name">i</span><span class="py-op">]</span><span class="py-op">)</span><span class="py-op">.</span><span class="py-name">encode</span><span class="py-op">(</span><span class="py-string">'utf-8'</span><span class="py-op">)</span><span class="py-op">)</span> </span>
<span class="lineno"> 204</span> <span class="py-line"> <span class="py-keyword">if</span> <span class="py-op">(</span><span class="py-name">None</span> <span class="py-op">!=</span> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">sessionId</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 205</span> <span class="py-line"> <span class="py-name">body</span> <span class="py-op">+=</span> <span class="py-string">"&amp;sessionId="</span> <span class="py-op">+</span> <span class="py-name">unicode</span><span class="py-op">(</span><span class="py-name">self</span><span class="py-op">.</span><span class="py-name">sessionId</span><span class="py-op">)</span> </span>
<span class="lineno"> 206</span> <span class="py-line"> <span class="py-name">headers</span> <span class="py-op">=</span> <span class="py-op">{</span><span class="py-string">"Content-Type"</span><span class="py-op">:</span> <span class="py-string">"application/x-www-form-urlencoded; charset=utf-8"</span><span class="py-op">}</span> </span>
<span class="lineno"> 207</span> <span class="py-line"> <span class="py-name">conn</span><span class="py-op">.</span><span class="py-name">request</span><span class="py-op">(</span><span class="py-string">"POST"</span><span class="py-op">,</span> <span class="py-string">"/selenium-server/driver/"</span><span class="py-op">,</span> <span class="py-name">body</span><span class="py-op">,</span> <span class="py-name">headers</span><span class="py-op">)</span> </span>
<span class="lineno"> 208</span> <span class="py-line"> </span>
<span class="lineno"> 209</span> <span class="py-line"> <span class="py-name">response</span> <span class="py-op">=</span> <span class="py-name">conn</span><span class="py-op">.</span><span class="py-name">getresponse</span><span class="py-op">(</span><span class="py-op">)</span> </span>
<span class="lineno"> 210</span> <span class="py-line"> <span class="py-comment">#print response.status, response.reason</span> </span>
<span class="lineno"> 211</span> <span class="py-line"><span class="py-comment"></span> <span class="py-name">data</span> <span class="py-op">=</span> <span class="py-name">unicode</span><span class="py-op">(</span><span class="py-name">response</span><span class="py-op">.</span><span class="py-name">read</span><span class="py-op">(</span><span class="py-op">)</span><span class="py-op">,</span> <span class="py-string">"UTF-8"</span><span class="py-op">)</span> </span>
<span class="lineno"> 212</span> <span class="py-line"> <span class="py-name">result</span> <span class="py-op">=</span> <span class="py-name">response</span><span class="py-op">.</span><span class="py-name">reason</span> </span>
<span class="lineno"> 213</span> <span class="py-line"> <span class="py-comment">#print "Selenium Result: " + repr(data) + "\n\n"</span> </span>
<span class="lineno"> 214</span> <span class="py-line"><span class="py-comment"></span> <span class="py-keyword">if</span> <span class="py-op">(</span><span class="py-keyword">not</span> <span class="py-name">data</span><span class="py-op">.</span><span class="py-name">startswith</span><span class="py-op">(</span><span class="py-string">'OK'</span><span class="py-op">)</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 215</span> <span class="py-line"> <span class="py-keyword">raise</span> <span class="py-name">Exception</span><span class="py-op">,</span> <span class="py-name">data</span> </span>
<span class="lineno"> 216</span> <span class="py-line"> <span class="py-keyword">return</span> <span class="py-name">data</span> </span>
</div><span class="lineno"> 217</span> <span class="py-line"> </span>
<a name="selenium.get_string"></a><div id="selenium.get_string-def"><span class="lineno"> 218</span> <a class="pysrc-toggle" href="#" id="selenium.get_string-toggle" onclick="toggle('selenium.get_string'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#get_string">get_string</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">verb</span><span class="py-op">,</span> <span class="py-param">args</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.get_string-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.get_string-expanded"><span class="lineno"> 219</span> <span class="py-line"> <span class="py-name">result</span> <span class="py-op">=</span> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-name">verb</span><span class="py-op">,</span> <span class="py-name">args</span><span class="py-op">)</span> </span>
<span class="lineno"> 220</span> <span class="py-line"> <span class="py-keyword">return</span> <span class="py-name">result</span><span class="py-op">[</span><span class="py-number">3</span><span class="py-op">:</span><span class="py-op">]</span> </span>
</div><span class="lineno"> 221</span> <span class="py-line"> </span>
<a name="selenium.get_string_array"></a><div id="selenium.get_string_array-def"><span class="lineno"> 222</span> <a class="pysrc-toggle" href="#" id="selenium.get_string_array-toggle" onclick="toggle('selenium.get_string_array'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#get_string_array">get_string_array</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">verb</span><span class="py-op">,</span> <span class="py-param">args</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.get_string_array-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.get_string_array-expanded"><span class="lineno"> 223</span> <span class="py-line"> <span class="py-name">csv</span> <span class="py-op">=</span> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.get_string" class="py-name" href="selenium.selenium-class.html#get_string">get_string</a><span class="py-op">(</span><span class="py-name">verb</span><span class="py-op">,</span> <span class="py-name">args</span><span class="py-op">)</span> </span>
<span class="lineno"> 224</span> <span class="py-line"> <span class="py-name">token</span> <span class="py-op">=</span> <span class="py-string">""</span> </span>
<span class="lineno"> 225</span> <span class="py-line"> <span class="py-name">tokens</span> <span class="py-op">=</span> <span class="py-op">[</span><span class="py-op">]</span> </span>
<span class="lineno"> 226</span> <span class="py-line"> <span class="py-name">escape</span> <span class="py-op">=</span> <span class="py-name">False</span> </span>
<span class="lineno"> 227</span> <span class="py-line"> <span class="py-keyword">for</span> <span class="py-name">i</span> <span class="py-keyword">in</span> <span class="py-name">range</span><span class="py-op">(</span><span class="py-name">len</span><span class="py-op">(</span><span class="py-name">csv</span><span class="py-op">)</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 228</span> <span class="py-line"> <span class="py-name">letter</span> <span class="py-op">=</span> <span class="py-name">csv</span><span class="py-op">[</span><span class="py-name">i</span><span class="py-op">]</span> </span>
<span class="lineno"> 229</span> <span class="py-line"> <span class="py-keyword">if</span> <span class="py-op">(</span><span class="py-name">escape</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 230</span> <span class="py-line"> <span class="py-name">token</span> <span class="py-op">=</span> <span class="py-name">token</span> <span class="py-op">+</span> <span class="py-name">letter</span> </span>
<span class="lineno"> 231</span> <span class="py-line"> <span class="py-name">escape</span> <span class="py-op">=</span> <span class="py-name">False</span> </span>
<span class="lineno"> 232</span> <span class="py-line"> <span class="py-keyword">continue</span> </span>
<span class="lineno"> 233</span> <span class="py-line"> <span class="py-keyword">if</span> <span class="py-op">(</span><span class="py-name">letter</span> <span class="py-op">==</span> <span class="py-string">'\\'</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 234</span> <span class="py-line"> <span class="py-name">escape</span> <span class="py-op">=</span> <span class="py-name">True</span> </span>
<span class="lineno"> 235</span> <span class="py-line"> <span class="py-keyword">elif</span> <span class="py-op">(</span><span class="py-name">letter</span> <span class="py-op">==</span> <span class="py-string">','</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 236</span> <span class="py-line"> <span class="py-name">tokens</span><span class="py-op">.</span><span class="py-name">append</span><span class="py-op">(</span><span class="py-name">token</span><span class="py-op">)</span> </span>
<span class="lineno"> 237</span> <span class="py-line"> <span class="py-name">token</span> <span class="py-op">=</span> <span class="py-string">""</span> </span>
<span class="lineno"> 238</span> <span class="py-line"> <span class="py-keyword">else</span><span class="py-op">:</span> </span>
<span class="lineno"> 239</span> <span class="py-line"> <span class="py-name">token</span> <span class="py-op">=</span> <span class="py-name">token</span> <span class="py-op">+</span> <span class="py-name">letter</span> </span>
<span class="lineno"> 240</span> <span class="py-line"> <span class="py-name">tokens</span><span class="py-op">.</span><span class="py-name">append</span><span class="py-op">(</span><span class="py-name">token</span><span class="py-op">)</span> </span>
<span class="lineno"> 241</span> <span class="py-line"> <span class="py-keyword">return</span> <span class="py-name">tokens</span> </span>
</div><span class="lineno"> 242</span> <span class="py-line"> </span>
<a name="selenium.get_number"></a><div id="selenium.get_number-def"><span class="lineno"> 243</span> <a class="pysrc-toggle" href="#" id="selenium.get_number-toggle" onclick="toggle('selenium.get_number'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#get_number">get_number</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">verb</span><span class="py-op">,</span> <span class="py-param">args</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.get_number-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.get_number-expanded"><span class="lineno"> 244</span> <span class="py-line"> <span class="py-comment"># Is there something I need to do here?</span> </span>
<span class="lineno"> 245</span> <span class="py-line"><span class="py-comment"></span> <span class="py-keyword">return</span> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.get_string" class="py-name" href="selenium.selenium-class.html#get_string">get_string</a><span class="py-op">(</span><span class="py-name">verb</span><span class="py-op">,</span> <span class="py-name">args</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 246</span> <span class="py-line"> </span>
<a name="selenium.get_number_array"></a><div id="selenium.get_number_array-def"><span class="lineno"> 247</span> <a class="pysrc-toggle" href="#" id="selenium.get_number_array-toggle" onclick="toggle('selenium.get_number_array'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#get_number_array">get_number_array</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">verb</span><span class="py-op">,</span> <span class="py-param">args</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.get_number_array-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.get_number_array-expanded"><span class="lineno"> 248</span> <span class="py-line"> <span class="py-comment"># Is there something I need to do here?</span> </span>
<span class="lineno"> 249</span> <span class="py-line"><span class="py-comment"></span> <span class="py-keyword">return</span> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.get_string_array" class="py-name" href="selenium.selenium-class.html#get_string_array">get_string_array</a><span class="py-op">(</span><span class="py-name">verb</span><span class="py-op">,</span> <span class="py-name">args</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 250</span> <span class="py-line"> </span>
<a name="selenium.get_boolean"></a><div id="selenium.get_boolean-def"><span class="lineno"> 251</span> <a class="pysrc-toggle" href="#" id="selenium.get_boolean-toggle" onclick="toggle('selenium.get_boolean'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#get_boolean">get_boolean</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">verb</span><span class="py-op">,</span> <span class="py-param">args</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.get_boolean-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.get_boolean-expanded"><span class="lineno"> 252</span> <span class="py-line"> <span class="py-name">boolstr</span> <span class="py-op">=</span> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.get_string" class="py-name" href="selenium.selenium-class.html#get_string">get_string</a><span class="py-op">(</span><span class="py-name">verb</span><span class="py-op">,</span> <span class="py-name">args</span><span class="py-op">)</span> </span>
<span class="lineno"> 253</span> <span class="py-line"> <span class="py-keyword">if</span> <span class="py-op">(</span><span class="py-string">"true"</span> <span class="py-op">==</span> <span class="py-name">boolstr</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 254</span> <span class="py-line"> <span class="py-keyword">return</span> <span class="py-name">True</span> </span>
<span class="lineno"> 255</span> <span class="py-line"> <span class="py-keyword">if</span> <span class="py-op">(</span><span class="py-string">"false"</span> <span class="py-op">==</span> <span class="py-name">boolstr</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 256</span> <span class="py-line"> <span class="py-keyword">return</span> <span class="py-name">False</span> </span>
<span class="lineno"> 257</span> <span class="py-line"> <span class="py-keyword">raise</span> <span class="py-name">ValueError</span><span class="py-op">,</span> <span class="py-string">"result is neither 'true' nor 'false': "</span> <span class="py-op">+</span> <span class="py-name">boolstr</span> </span>
</div><span class="lineno"> 258</span> <span class="py-line"> </span>
<a name="selenium.get_boolean_array"></a><div id="selenium.get_boolean_array-def"><span class="lineno"> 259</span> <a class="pysrc-toggle" href="#" id="selenium.get_boolean_array-toggle" onclick="toggle('selenium.get_boolean_array'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#get_boolean_array">get_boolean_array</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">verb</span><span class="py-op">,</span> <span class="py-param">args</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.get_boolean_array-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.get_boolean_array-expanded"><span class="lineno"> 260</span> <span class="py-line"> <span class="py-name">boolarr</span> <span class="py-op">=</span> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.get_string_array" class="py-name" href="selenium.selenium-class.html#get_string_array">get_string_array</a><span class="py-op">(</span><span class="py-name">verb</span><span class="py-op">,</span> <span class="py-name">args</span><span class="py-op">)</span> </span>
<span class="lineno"> 261</span> <span class="py-line"> <span class="py-keyword">for</span> <span class="py-name">i</span> <span class="py-keyword">in</span> <span class="py-name">range</span><span class="py-op">(</span><span class="py-name">len</span><span class="py-op">(</span><span class="py-name">boolarr</span><span class="py-op">)</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 262</span> <span class="py-line"> <span class="py-keyword">if</span> <span class="py-op">(</span><span class="py-string">"true"</span> <span class="py-op">==</span> <span class="py-name">boolstr</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 263</span> <span class="py-line"> <span class="py-name">boolarr</span><span class="py-op">[</span><span class="py-name">i</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">True</span> </span>
<span class="lineno"> 264</span> <span class="py-line"> <span class="py-keyword">continue</span> </span>
<span class="lineno"> 265</span> <span class="py-line"> <span class="py-keyword">if</span> <span class="py-op">(</span><span class="py-string">"false"</span> <span class="py-op">==</span> <span class="py-name">boolstr</span><span class="py-op">)</span><span class="py-op">:</span> </span>
<span class="lineno"> 266</span> <span class="py-line"> <span class="py-name">boolarr</span><span class="py-op">[</span><span class="py-name">i</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">False</span> </span>
<span class="lineno"> 267</span> <span class="py-line"> <span class="py-keyword">continue</span> </span>
<span class="lineno"> 268</span> <span class="py-line"> <span class="py-keyword">raise</span> <span class="py-name">ValueError</span><span class="py-op">,</span> <span class="py-string">"result is neither 'true' nor 'false': "</span> <span class="py-op">+</span> <span class="py-name">boolarr</span><span class="py-op">[</span><span class="py-name">i</span><span class="py-op">]</span> </span>
<span class="lineno"> 269</span> <span class="py-line"> <span class="py-keyword">return</span> <span class="py-name">boolarr</span> </span>
</div><span class="lineno"> 270</span> <span class="py-line"> </span>
<span class="lineno"> 271</span> <span class="py-line"> </span>
<span class="lineno"> 272</span> <span class="py-line"> </span>
<span class="lineno"> 273</span> <span class="py-line"><span class="py-comment">### From here on, everything's auto-generated from XML</span> </span>
<span class="lineno"> 274</span> <span class="py-line"><span class="py-comment"></span> </span>
<span class="lineno"> 275</span> <span class="py-line"> </span>
<a name="selenium.click"></a><div id="selenium.click-def"><span class="lineno"> 276</span> <a class="pysrc-toggle" href="#" id="selenium.click-toggle" onclick="toggle('selenium.click'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#click">click</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.click-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.click-expanded"><span class="lineno"> 277</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 278</span> <span class="py-line"><span class="py-docstring"> Clicks on a link, button, checkbox or radio button. If the click action</span> </span>
<span class="lineno"> 279</span> <span class="py-line"><span class="py-docstring"> causes a new page to load (like a link usually does), call</span> </span>
<span class="lineno"> 280</span> <span class="py-line"><span class="py-docstring"> waitForPageToLoad.</span> </span>
<span class="lineno"> 281</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 282</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 283</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 284</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"click"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 285</span> <span class="py-line"> </span>
<span class="lineno"> 286</span> <span class="py-line"> </span>
<a name="selenium.double_click"></a><div id="selenium.double_click-def"><span class="lineno"> 287</span> <a class="pysrc-toggle" href="#" id="selenium.double_click-toggle" onclick="toggle('selenium.double_click'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#double_click">double_click</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.double_click-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.double_click-expanded"><span class="lineno"> 288</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 289</span> <span class="py-line"><span class="py-docstring"> Double clicks on a link, button, checkbox or radio button. If the double click action</span> </span>
<span class="lineno"> 290</span> <span class="py-line"><span class="py-docstring"> causes a new page to load (like a link usually does), call</span> </span>
<span class="lineno"> 291</span> <span class="py-line"><span class="py-docstring"> waitForPageToLoad.</span> </span>
<span class="lineno"> 292</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 293</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 294</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 295</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"doubleClick"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 296</span> <span class="py-line"> </span>
<span class="lineno"> 297</span> <span class="py-line"> </span>
<a name="selenium.context_menu"></a><div id="selenium.context_menu-def"><span class="lineno"> 298</span> <a class="pysrc-toggle" href="#" id="selenium.context_menu-toggle" onclick="toggle('selenium.context_menu'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#context_menu">context_menu</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.context_menu-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.context_menu-expanded"><span class="lineno"> 299</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 300</span> <span class="py-line"><span class="py-docstring"> Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).</span> </span>
<span class="lineno"> 301</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 302</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 303</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 304</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"contextMenu"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 305</span> <span class="py-line"> </span>
<span class="lineno"> 306</span> <span class="py-line"> </span>
<a name="selenium.click_at"></a><div id="selenium.click_at-def"><span class="lineno"> 307</span> <a class="pysrc-toggle" href="#" id="selenium.click_at-toggle" onclick="toggle('selenium.click_at'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#click_at">click_at</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">coordString</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.click_at-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.click_at-expanded"><span class="lineno"> 308</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 309</span> <span class="py-line"><span class="py-docstring"> Clicks on a link, button, checkbox or radio button. If the click action</span> </span>
<span class="lineno"> 310</span> <span class="py-line"><span class="py-docstring"> causes a new page to load (like a link usually does), call</span> </span>
<span class="lineno"> 311</span> <span class="py-line"><span class="py-docstring"> waitForPageToLoad.</span> </span>
<span class="lineno"> 312</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 313</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 314</span> <span class="py-line"><span class="py-docstring"> 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</span> </span>
<span class="lineno"> 315</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 316</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"clickAt"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">coordString</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 317</span> <span class="py-line"> </span>
<span class="lineno"> 318</span> <span class="py-line"> </span>
<a name="selenium.double_click_at"></a><div id="selenium.double_click_at-def"><span class="lineno"> 319</span> <a class="pysrc-toggle" href="#" id="selenium.double_click_at-toggle" onclick="toggle('selenium.double_click_at'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#double_click_at">double_click_at</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">coordString</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.double_click_at-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.double_click_at-expanded"><span class="lineno"> 320</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 321</span> <span class="py-line"><span class="py-docstring"> Doubleclicks on a link, button, checkbox or radio button. If the action</span> </span>
<span class="lineno"> 322</span> <span class="py-line"><span class="py-docstring"> causes a new page to load (like a link usually does), call</span> </span>
<span class="lineno"> 323</span> <span class="py-line"><span class="py-docstring"> waitForPageToLoad.</span> </span>
<span class="lineno"> 324</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 325</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 326</span> <span class="py-line"><span class="py-docstring"> 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</span> </span>
<span class="lineno"> 327</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 328</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"doubleClickAt"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">coordString</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 329</span> <span class="py-line"> </span>
<span class="lineno"> 330</span> <span class="py-line"> </span>
<a name="selenium.context_menu_at"></a><div id="selenium.context_menu_at-def"><span class="lineno"> 331</span> <a class="pysrc-toggle" href="#" id="selenium.context_menu_at-toggle" onclick="toggle('selenium.context_menu_at'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#context_menu_at">context_menu_at</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">coordString</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.context_menu_at-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.context_menu_at-expanded"><span class="lineno"> 332</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 333</span> <span class="py-line"><span class="py-docstring"> Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).</span> </span>
<span class="lineno"> 334</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 335</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 336</span> <span class="py-line"><span class="py-docstring"> 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</span> </span>
<span class="lineno"> 337</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 338</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"contextMenuAt"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">coordString</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 339</span> <span class="py-line"> </span>
<span class="lineno"> 340</span> <span class="py-line"> </span>
<a name="selenium.fire_event"></a><div id="selenium.fire_event-def"><span class="lineno"> 341</span> <a class="pysrc-toggle" href="#" id="selenium.fire_event-toggle" onclick="toggle('selenium.fire_event'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#fire_event">fire_event</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">eventName</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.fire_event-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.fire_event-expanded"><span class="lineno"> 342</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 343</span> <span class="py-line"><span class="py-docstring"> Explicitly simulate an event, to trigger the corresponding "on\ *event*"</span> </span>
<span class="lineno"> 344</span> <span class="py-line"><span class="py-docstring"> handler.</span> </span>
<span class="lineno"> 345</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 346</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 347</span> <span class="py-line"><span class="py-docstring"> 'eventName' is the event name, e.g. "focus" or "blur"</span> </span>
<span class="lineno"> 348</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 349</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"fireEvent"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">eventName</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 350</span> <span class="py-line"> </span>
<span class="lineno"> 351</span> <span class="py-line"> </span>
<a name="selenium.focus"></a><div id="selenium.focus-def"><span class="lineno"> 352</span> <a class="pysrc-toggle" href="#" id="selenium.focus-toggle" onclick="toggle('selenium.focus'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#focus">focus</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.focus-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.focus-expanded"><span class="lineno"> 353</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 354</span> <span class="py-line"><span class="py-docstring"> Move the focus to the specified element; for example, if the element is an input field, move the cursor to that field.</span> </span>
<span class="lineno"> 355</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 356</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 357</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 358</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"focus"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 359</span> <span class="py-line"> </span>
<span class="lineno"> 360</span> <span class="py-line"> </span>
<a name="selenium.key_press"></a><div id="selenium.key_press-def"><span class="lineno"> 361</span> <a class="pysrc-toggle" href="#" id="selenium.key_press-toggle" onclick="toggle('selenium.key_press'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#key_press">key_press</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">keySequence</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.key_press-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.key_press-expanded"><span class="lineno"> 362</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 363</span> <span class="py-line"><span class="py-docstring"> Simulates a user pressing and releasing a key.</span> </span>
<span class="lineno"> 364</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 365</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 366</span> <span class="py-line"><span class="py-docstring"> 'keySequence' is Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119".</span> </span>
<span class="lineno"> 367</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 368</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"keyPress"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">keySequence</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 369</span> <span class="py-line"> </span>
<span class="lineno"> 370</span> <span class="py-line"> </span>
<a name="selenium.shift_key_down"></a><div id="selenium.shift_key_down-def"><span class="lineno"> 371</span> <a class="pysrc-toggle" href="#" id="selenium.shift_key_down-toggle" onclick="toggle('selenium.shift_key_down'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#shift_key_down">shift_key_down</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.shift_key_down-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.shift_key_down-expanded"><span class="lineno"> 372</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 373</span> <span class="py-line"><span class="py-docstring"> Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.</span> </span>
<span class="lineno"> 374</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 375</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 376</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"shiftKeyDown"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 377</span> <span class="py-line"> </span>
<span class="lineno"> 378</span> <span class="py-line"> </span>
<a name="selenium.shift_key_up"></a><div id="selenium.shift_key_up-def"><span class="lineno"> 379</span> <a class="pysrc-toggle" href="#" id="selenium.shift_key_up-toggle" onclick="toggle('selenium.shift_key_up'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#shift_key_up">shift_key_up</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.shift_key_up-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.shift_key_up-expanded"><span class="lineno"> 380</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 381</span> <span class="py-line"><span class="py-docstring"> Release the shift key.</span> </span>
<span class="lineno"> 382</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 383</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 384</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"shiftKeyUp"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 385</span> <span class="py-line"> </span>
<span class="lineno"> 386</span> <span class="py-line"> </span>
<a name="selenium.meta_key_down"></a><div id="selenium.meta_key_down-def"><span class="lineno"> 387</span> <a class="pysrc-toggle" href="#" id="selenium.meta_key_down-toggle" onclick="toggle('selenium.meta_key_down'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#meta_key_down">meta_key_down</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.meta_key_down-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.meta_key_down-expanded"><span class="lineno"> 388</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 389</span> <span class="py-line"><span class="py-docstring"> Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.</span> </span>
<span class="lineno"> 390</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 391</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 392</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"metaKeyDown"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 393</span> <span class="py-line"> </span>
<span class="lineno"> 394</span> <span class="py-line"> </span>
<a name="selenium.meta_key_up"></a><div id="selenium.meta_key_up-def"><span class="lineno"> 395</span> <a class="pysrc-toggle" href="#" id="selenium.meta_key_up-toggle" onclick="toggle('selenium.meta_key_up'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#meta_key_up">meta_key_up</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.meta_key_up-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.meta_key_up-expanded"><span class="lineno"> 396</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 397</span> <span class="py-line"><span class="py-docstring"> Release the meta key.</span> </span>
<span class="lineno"> 398</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 399</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 400</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"metaKeyUp"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 401</span> <span class="py-line"> </span>
<span class="lineno"> 402</span> <span class="py-line"> </span>
<a name="selenium.alt_key_down"></a><div id="selenium.alt_key_down-def"><span class="lineno"> 403</span> <a class="pysrc-toggle" href="#" id="selenium.alt_key_down-toggle" onclick="toggle('selenium.alt_key_down'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#alt_key_down">alt_key_down</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.alt_key_down-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.alt_key_down-expanded"><span class="lineno"> 404</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 405</span> <span class="py-line"><span class="py-docstring"> Press the alt key and hold it down until doAltUp() is called or a new page is loaded.</span> </span>
<span class="lineno"> 406</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 407</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 408</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"altKeyDown"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 409</span> <span class="py-line"> </span>
<span class="lineno"> 410</span> <span class="py-line"> </span>
<a name="selenium.alt_key_up"></a><div id="selenium.alt_key_up-def"><span class="lineno"> 411</span> <a class="pysrc-toggle" href="#" id="selenium.alt_key_up-toggle" onclick="toggle('selenium.alt_key_up'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#alt_key_up">alt_key_up</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.alt_key_up-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.alt_key_up-expanded"><span class="lineno"> 412</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 413</span> <span class="py-line"><span class="py-docstring"> Release the alt key.</span> </span>
<span class="lineno"> 414</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 415</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 416</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"altKeyUp"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 417</span> <span class="py-line"> </span>
<span class="lineno"> 418</span> <span class="py-line"> </span>
<a name="selenium.control_key_down"></a><div id="selenium.control_key_down-def"><span class="lineno"> 419</span> <a class="pysrc-toggle" href="#" id="selenium.control_key_down-toggle" onclick="toggle('selenium.control_key_down'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#control_key_down">control_key_down</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.control_key_down-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.control_key_down-expanded"><span class="lineno"> 420</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 421</span> <span class="py-line"><span class="py-docstring"> Press the control key and hold it down until doControlUp() is called or a new page is loaded.</span> </span>
<span class="lineno"> 422</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 423</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 424</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"controlKeyDown"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 425</span> <span class="py-line"> </span>
<span class="lineno"> 426</span> <span class="py-line"> </span>
<a name="selenium.control_key_up"></a><div id="selenium.control_key_up-def"><span class="lineno"> 427</span> <a class="pysrc-toggle" href="#" id="selenium.control_key_up-toggle" onclick="toggle('selenium.control_key_up'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#control_key_up">control_key_up</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.control_key_up-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.control_key_up-expanded"><span class="lineno"> 428</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 429</span> <span class="py-line"><span class="py-docstring"> Release the control key.</span> </span>
<span class="lineno"> 430</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 431</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 432</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"controlKeyUp"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 433</span> <span class="py-line"> </span>
<span class="lineno"> 434</span> <span class="py-line"> </span>
<a name="selenium.key_down"></a><div id="selenium.key_down-def"><span class="lineno"> 435</span> <a class="pysrc-toggle" href="#" id="selenium.key_down-toggle" onclick="toggle('selenium.key_down'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#key_down">key_down</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">keySequence</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.key_down-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.key_down-expanded"><span class="lineno"> 436</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 437</span> <span class="py-line"><span class="py-docstring"> Simulates a user pressing a key (without releasing it yet).</span> </span>
<span class="lineno"> 438</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 439</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 440</span> <span class="py-line"><span class="py-docstring"> 'keySequence' is Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119".</span> </span>
<span class="lineno"> 441</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 442</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"keyDown"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">keySequence</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 443</span> <span class="py-line"> </span>
<span class="lineno"> 444</span> <span class="py-line"> </span>
<a name="selenium.key_up"></a><div id="selenium.key_up-def"><span class="lineno"> 445</span> <a class="pysrc-toggle" href="#" id="selenium.key_up-toggle" onclick="toggle('selenium.key_up'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#key_up">key_up</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">keySequence</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.key_up-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.key_up-expanded"><span class="lineno"> 446</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 447</span> <span class="py-line"><span class="py-docstring"> Simulates a user releasing a key.</span> </span>
<span class="lineno"> 448</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 449</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 450</span> <span class="py-line"><span class="py-docstring"> 'keySequence' is Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119".</span> </span>
<span class="lineno"> 451</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 452</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"keyUp"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">keySequence</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 453</span> <span class="py-line"> </span>
<span class="lineno"> 454</span> <span class="py-line"> </span>
<a name="selenium.mouse_over"></a><div id="selenium.mouse_over-def"><span class="lineno"> 455</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_over-toggle" onclick="toggle('selenium.mouse_over'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_over">mouse_over</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_over-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_over-expanded"><span class="lineno"> 456</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 457</span> <span class="py-line"><span class="py-docstring"> Simulates a user hovering a mouse over the specified element.</span> </span>
<span class="lineno"> 458</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 459</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 460</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 461</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseOver"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 462</span> <span class="py-line"> </span>
<span class="lineno"> 463</span> <span class="py-line"> </span>
<a name="selenium.mouse_out"></a><div id="selenium.mouse_out-def"><span class="lineno"> 464</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_out-toggle" onclick="toggle('selenium.mouse_out'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_out">mouse_out</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_out-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_out-expanded"><span class="lineno"> 465</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 466</span> <span class="py-line"><span class="py-docstring"> Simulates a user moving the mouse pointer away from the specified element.</span> </span>
<span class="lineno"> 467</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 468</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 469</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 470</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseOut"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 471</span> <span class="py-line"> </span>
<span class="lineno"> 472</span> <span class="py-line"> </span>
<a name="selenium.mouse_down"></a><div id="selenium.mouse_down-def"><span class="lineno"> 473</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_down-toggle" onclick="toggle('selenium.mouse_down'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_down">mouse_down</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_down-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_down-expanded"><span class="lineno"> 474</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 475</span> <span class="py-line"><span class="py-docstring"> Simulates a user pressing the left mouse button (without releasing it yet) on</span> </span>
<span class="lineno"> 476</span> <span class="py-line"><span class="py-docstring"> the specified element.</span> </span>
<span class="lineno"> 477</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 478</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 479</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 480</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseDown"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 481</span> <span class="py-line"> </span>
<span class="lineno"> 482</span> <span class="py-line"> </span>
<a name="selenium.mouse_down_right"></a><div id="selenium.mouse_down_right-def"><span class="lineno"> 483</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_down_right-toggle" onclick="toggle('selenium.mouse_down_right'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_down_right">mouse_down_right</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_down_right-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_down_right-expanded"><span class="lineno"> 484</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 485</span> <span class="py-line"><span class="py-docstring"> Simulates a user pressing the right mouse button (without releasing it yet) on</span> </span>
<span class="lineno"> 486</span> <span class="py-line"><span class="py-docstring"> the specified element.</span> </span>
<span class="lineno"> 487</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 488</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 489</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 490</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseDownRight"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 491</span> <span class="py-line"> </span>
<span class="lineno"> 492</span> <span class="py-line"> </span>
<a name="selenium.mouse_down_at"></a><div id="selenium.mouse_down_at-def"><span class="lineno"> 493</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_down_at-toggle" onclick="toggle('selenium.mouse_down_at'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_down_at">mouse_down_at</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">coordString</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_down_at-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_down_at-expanded"><span class="lineno"> 494</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 495</span> <span class="py-line"><span class="py-docstring"> Simulates a user pressing the left mouse button (without releasing it yet) at</span> </span>
<span class="lineno"> 496</span> <span class="py-line"><span class="py-docstring"> the specified location.</span> </span>
<span class="lineno"> 497</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 498</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 499</span> <span class="py-line"><span class="py-docstring"> 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</span> </span>
<span class="lineno"> 500</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 501</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseDownAt"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">coordString</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 502</span> <span class="py-line"> </span>
<span class="lineno"> 503</span> <span class="py-line"> </span>
<a name="selenium.mouse_down_right_at"></a><div id="selenium.mouse_down_right_at-def"><span class="lineno"> 504</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_down_right_at-toggle" onclick="toggle('selenium.mouse_down_right_at'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_down_right_at">mouse_down_right_at</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">coordString</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_down_right_at-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_down_right_at-expanded"><span class="lineno"> 505</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 506</span> <span class="py-line"><span class="py-docstring"> Simulates a user pressing the right mouse button (without releasing it yet) at</span> </span>
<span class="lineno"> 507</span> <span class="py-line"><span class="py-docstring"> the specified location.</span> </span>
<span class="lineno"> 508</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 509</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 510</span> <span class="py-line"><span class="py-docstring"> 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</span> </span>
<span class="lineno"> 511</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 512</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseDownRightAt"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">coordString</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 513</span> <span class="py-line"> </span>
<span class="lineno"> 514</span> <span class="py-line"> </span>
<a name="selenium.mouse_up"></a><div id="selenium.mouse_up-def"><span class="lineno"> 515</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_up-toggle" onclick="toggle('selenium.mouse_up'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_up">mouse_up</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_up-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_up-expanded"><span class="lineno"> 516</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 517</span> <span class="py-line"><span class="py-docstring"> Simulates the event that occurs when the user releases the mouse button (i.e., stops</span> </span>
<span class="lineno"> 518</span> <span class="py-line"><span class="py-docstring"> holding the button down) on the specified element.</span> </span>
<span class="lineno"> 519</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 520</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 521</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 522</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseUp"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 523</span> <span class="py-line"> </span>
<span class="lineno"> 524</span> <span class="py-line"> </span>
<a name="selenium.mouse_up_right"></a><div id="selenium.mouse_up_right-def"><span class="lineno"> 525</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_up_right-toggle" onclick="toggle('selenium.mouse_up_right'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_up_right">mouse_up_right</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_up_right-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_up_right-expanded"><span class="lineno"> 526</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 527</span> <span class="py-line"><span class="py-docstring"> Simulates the event that occurs when the user releases the right mouse button (i.e., stops</span> </span>
<span class="lineno"> 528</span> <span class="py-line"><span class="py-docstring"> holding the button down) on the specified element.</span> </span>
<span class="lineno"> 529</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 530</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 531</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 532</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseUpRight"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 533</span> <span class="py-line"> </span>
<span class="lineno"> 534</span> <span class="py-line"> </span>
<a name="selenium.mouse_up_at"></a><div id="selenium.mouse_up_at-def"><span class="lineno"> 535</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_up_at-toggle" onclick="toggle('selenium.mouse_up_at'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_up_at">mouse_up_at</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">coordString</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_up_at-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_up_at-expanded"><span class="lineno"> 536</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 537</span> <span class="py-line"><span class="py-docstring"> Simulates the event that occurs when the user releases the mouse button (i.e., stops</span> </span>
<span class="lineno"> 538</span> <span class="py-line"><span class="py-docstring"> holding the button down) at the specified location.</span> </span>
<span class="lineno"> 539</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 540</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 541</span> <span class="py-line"><span class="py-docstring"> 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</span> </span>
<span class="lineno"> 542</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 543</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseUpAt"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">coordString</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 544</span> <span class="py-line"> </span>
<span class="lineno"> 545</span> <span class="py-line"> </span>
<a name="selenium.mouse_up_right_at"></a><div id="selenium.mouse_up_right_at-def"><span class="lineno"> 546</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_up_right_at-toggle" onclick="toggle('selenium.mouse_up_right_at'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_up_right_at">mouse_up_right_at</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">coordString</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_up_right_at-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_up_right_at-expanded"><span class="lineno"> 547</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 548</span> <span class="py-line"><span class="py-docstring"> Simulates the event that occurs when the user releases the right mouse button (i.e., stops</span> </span>
<span class="lineno"> 549</span> <span class="py-line"><span class="py-docstring"> holding the button down) at the specified location.</span> </span>
<span class="lineno"> 550</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 551</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 552</span> <span class="py-line"><span class="py-docstring"> 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</span> </span>
<span class="lineno"> 553</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 554</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseUpRightAt"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">coordString</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 555</span> <span class="py-line"> </span>
<span class="lineno"> 556</span> <span class="py-line"> </span>
<a name="selenium.mouse_move"></a><div id="selenium.mouse_move-def"><span class="lineno"> 557</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_move-toggle" onclick="toggle('selenium.mouse_move'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_move">mouse_move</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_move-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_move-expanded"><span class="lineno"> 558</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 559</span> <span class="py-line"><span class="py-docstring"> Simulates a user pressing the mouse button (without releasing it yet) on</span> </span>
<span class="lineno"> 560</span> <span class="py-line"><span class="py-docstring"> the specified element.</span> </span>
<span class="lineno"> 561</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 562</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 563</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 564</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseMove"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 565</span> <span class="py-line"> </span>
<span class="lineno"> 566</span> <span class="py-line"> </span>
<a name="selenium.mouse_move_at"></a><div id="selenium.mouse_move_at-def"><span class="lineno"> 567</span> <a class="pysrc-toggle" href="#" id="selenium.mouse_move_at-toggle" onclick="toggle('selenium.mouse_move_at'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#mouse_move_at">mouse_move_at</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">coordString</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.mouse_move_at-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.mouse_move_at-expanded"><span class="lineno"> 568</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 569</span> <span class="py-line"><span class="py-docstring"> Simulates a user pressing the mouse button (without releasing it yet) on</span> </span>
<span class="lineno"> 570</span> <span class="py-line"><span class="py-docstring"> the specified element.</span> </span>
<span class="lineno"> 571</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 572</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 573</span> <span class="py-line"><span class="py-docstring"> 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</span> </span>
<span class="lineno"> 574</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 575</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"mouseMoveAt"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">coordString</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 576</span> <span class="py-line"> </span>
<span class="lineno"> 577</span> <span class="py-line"> </span>
<a name="selenium.type"></a><div id="selenium.type-def"><span class="lineno"> 578</span> <a class="pysrc-toggle" href="#" id="selenium.type-toggle" onclick="toggle('selenium.type'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#type">type</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">value</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.type-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.type-expanded"><span class="lineno"> 579</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 580</span> <span class="py-line"><span class="py-docstring"> Sets the value of an input field, as though you typed it in.</span> </span>
<span class="lineno"> 581</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 582</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 583</span> <span class="py-line"><span class="py-docstring"> Can also be used to set the value of combo boxes, check boxes, etc. In these cases,</span> </span>
<span class="lineno"> 584</span> <span class="py-line"><span class="py-docstring"> value should be the value of the option selected, not the visible text.</span> </span>
<span class="lineno"> 585</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 586</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 587</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 588</span> <span class="py-line"><span class="py-docstring"> 'value' is the value to type</span> </span>
<span class="lineno"> 589</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 590</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"type"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">value</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 591</span> <span class="py-line"> </span>
<span class="lineno"> 592</span> <span class="py-line"> </span>
<a name="selenium.type_keys"></a><div id="selenium.type_keys-def"><span class="lineno"> 593</span> <a class="pysrc-toggle" href="#" id="selenium.type_keys-toggle" onclick="toggle('selenium.type_keys'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#type_keys">type_keys</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">value</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.type_keys-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.type_keys-expanded"><span class="lineno"> 594</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 595</span> <span class="py-line"><span class="py-docstring"> Simulates keystroke events on the specified element, as though you typed the value key-by-key.</span> </span>
<span class="lineno"> 596</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 597</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 598</span> <span class="py-line"><span class="py-docstring"> This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string;</span> </span>
<span class="lineno"> 599</span> <span class="py-line"><span class="py-docstring"> this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.</span> </span>
<span class="lineno"> 600</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 601</span> <span class="py-line"><span class="py-docstring"> Unlike the simple "type" command, which forces the specified value into the page directly, this command</span> </span>
<span class="lineno"> 602</span> <span class="py-line"><span class="py-docstring"> may or may not have any visible effect, even in cases where typing keys would normally have a visible effect.</span> </span>
<span class="lineno"> 603</span> <span class="py-line"><span class="py-docstring"> For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in</span> </span>
<span class="lineno"> 604</span> <span class="py-line"><span class="py-docstring"> the field.</span> </span>
<span class="lineno"> 605</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 606</span> <span class="py-line"><span class="py-docstring"> In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to</span> </span>
<span class="lineno"> 607</span> <span class="py-line"><span class="py-docstring"> send the keystroke events corresponding to what you just typed.</span> </span>
<span class="lineno"> 608</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 609</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 610</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 611</span> <span class="py-line"><span class="py-docstring"> 'value' is the value to type</span> </span>
<span class="lineno"> 612</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 613</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"typeKeys"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">value</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 614</span> <span class="py-line"> </span>
<span class="lineno"> 615</span> <span class="py-line"> </span>
<a name="selenium.set_speed"></a><div id="selenium.set_speed-def"><span class="lineno"> 616</span> <a class="pysrc-toggle" href="#" id="selenium.set_speed-toggle" onclick="toggle('selenium.set_speed'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#set_speed">set_speed</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">value</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.set_speed-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.set_speed-expanded"><span class="lineno"> 617</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 618</span> <span class="py-line"><span class="py-docstring"> Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation). By default, there is no such delay, i.e.,</span> </span>
<span class="lineno"> 619</span> <span class="py-line"><span class="py-docstring"> the delay is 0 milliseconds.</span> </span>
<span class="lineno"> 620</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 621</span> <span class="py-line"><span class="py-docstring"> 'value' is the number of milliseconds to pause after operation</span> </span>
<span class="lineno"> 622</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 623</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"setSpeed"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">value</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 624</span> <span class="py-line"> </span>
<span class="lineno"> 625</span> <span class="py-line"> </span>
<a name="selenium.get_speed"></a><div id="selenium.get_speed-def"><span class="lineno"> 626</span> <a class="pysrc-toggle" href="#" id="selenium.get_speed-toggle" onclick="toggle('selenium.get_speed'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#get_speed">get_speed</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.get_speed-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.get_speed-expanded"><span class="lineno"> 627</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 628</span> <span class="py-line"><span class="py-docstring"> Get execution speed (i.e., get the millisecond length of the delay following each selenium operation). By default, there is no such delay, i.e.,</span> </span>
<span class="lineno"> 629</span> <span class="py-line"><span class="py-docstring"> the delay is 0 milliseconds.</span> </span>
<span class="lineno"> 630</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 631</span> <span class="py-line"><span class="py-docstring"> See also setSpeed.</span> </span>
<span class="lineno"> 632</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 633</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 634</span> <span class="py-line"> <span class="py-keyword">return</span> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.get_string" class="py-name" href="selenium.selenium-class.html#get_string">get_string</a><span class="py-op">(</span><span class="py-string">"getSpeed"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 635</span> <span class="py-line"> </span>
<span class="lineno"> 636</span> <span class="py-line"> </span>
<a name="selenium.check"></a><div id="selenium.check-def"><span class="lineno"> 637</span> <a class="pysrc-toggle" href="#" id="selenium.check-toggle" onclick="toggle('selenium.check'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#check">check</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.check-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.check-expanded"><span class="lineno"> 638</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 639</span> <span class="py-line"><span class="py-docstring"> Check a toggle-button (checkbox/radio)</span> </span>
<span class="lineno"> 640</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 641</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 642</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 643</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"check"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 644</span> <span class="py-line"> </span>
<span class="lineno"> 645</span> <span class="py-line"> </span>
<a name="selenium.uncheck"></a><div id="selenium.uncheck-def"><span class="lineno"> 646</span> <a class="pysrc-toggle" href="#" id="selenium.uncheck-toggle" onclick="toggle('selenium.uncheck'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#uncheck">uncheck</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.uncheck-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.uncheck-expanded"><span class="lineno"> 647</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 648</span> <span class="py-line"><span class="py-docstring"> Uncheck a toggle-button (checkbox/radio)</span> </span>
<span class="lineno"> 649</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 650</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator</span> </span>
<span class="lineno"> 651</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 652</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"uncheck"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 653</span> <span class="py-line"> </span>
<span class="lineno"> 654</span> <span class="py-line"> </span>
<a name="selenium.select"></a><div id="selenium.select-def"><span class="lineno"> 655</span> <a class="pysrc-toggle" href="#" id="selenium.select-toggle" onclick="toggle('selenium.select'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#select">select</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">selectLocator</span><span class="py-op">,</span><span class="py-param">optionLocator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.select-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.select-expanded"><span class="lineno"> 656</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 657</span> <span class="py-line"><span class="py-docstring"> Select an option from a drop-down using an option locator.</span> </span>
<span class="lineno"> 658</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 659</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 660</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 661</span> <span class="py-line"><span class="py-docstring"> Option locators provide different ways of specifying options of an HTML</span> </span>
<span class="lineno"> 662</span> <span class="py-line"><span class="py-docstring"> Select element (e.g. for selecting a specific option, or for asserting</span> </span>
<span class="lineno"> 663</span> <span class="py-line"><span class="py-docstring"> that the selected option satisfies a specification). There are several</span> </span>
<span class="lineno"> 664</span> <span class="py-line"><span class="py-docstring"> forms of Select Option Locator.</span> </span>
<span class="lineno"> 665</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 666</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 667</span> <span class="py-line"><span class="py-docstring"> * \ **label**\ =\ *labelPattern*:</span> </span>
<span class="lineno"> 668</span> <span class="py-line"><span class="py-docstring"> matches options based on their labels, i.e. the visible text. (This</span> </span>
<span class="lineno"> 669</span> <span class="py-line"><span class="py-docstring"> is the default.)</span> </span>
<span class="lineno"> 670</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 671</span> <span class="py-line"><span class="py-docstring"> * label=regexp:^[Oo]ther</span> </span>
<span class="lineno"> 672</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 673</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 674</span> <span class="py-line"><span class="py-docstring"> * \ **value**\ =\ *valuePattern*:</span> </span>
<span class="lineno"> 675</span> <span class="py-line"><span class="py-docstring"> matches options based on their values.</span> </span>
<span class="lineno"> 676</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 677</span> <span class="py-line"><span class="py-docstring"> * value=other</span> </span>
<span class="lineno"> 678</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 679</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 680</span> <span class="py-line"><span class="py-docstring"> * \ **id**\ =\ *id*:</span> </span>
<span class="lineno"> 681</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 682</span> <span class="py-line"><span class="py-docstring"> matches options based on their ids.</span> </span>
<span class="lineno"> 683</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 684</span> <span class="py-line"><span class="py-docstring"> * id=option1</span> </span>
<span class="lineno"> 685</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 686</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 687</span> <span class="py-line"><span class="py-docstring"> * \ **index**\ =\ *index*:</span> </span>
<span class="lineno"> 688</span> <span class="py-line"><span class="py-docstring"> matches an option based on its index (offset from zero).</span> </span>
<span class="lineno"> 689</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 690</span> <span class="py-line"><span class="py-docstring"> * index=2</span> </span>
<span class="lineno"> 691</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 692</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 693</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 694</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 695</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 696</span> <span class="py-line"><span class="py-docstring"> If no option locator prefix is provided, the default behaviour is to match on \ **label**\ .</span> </span>
<span class="lineno"> 697</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 698</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 699</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 700</span> <span class="py-line"><span class="py-docstring"> 'selectLocator' is an element locator identifying a drop-down menu</span> </span>
<span class="lineno"> 701</span> <span class="py-line"><span class="py-docstring"> 'optionLocator' is an option locator (a label by default)</span> </span>
<span class="lineno"> 702</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 703</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"select"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">selectLocator</span><span class="py-op">,</span><span class="py-name">optionLocator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 704</span> <span class="py-line"> </span>
<span class="lineno"> 705</span> <span class="py-line"> </span>
<a name="selenium.add_selection"></a><div id="selenium.add_selection-def"><span class="lineno"> 706</span> <a class="pysrc-toggle" href="#" id="selenium.add_selection-toggle" onclick="toggle('selenium.add_selection'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#add_selection">add_selection</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">optionLocator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.add_selection-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.add_selection-expanded"><span class="lineno"> 707</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 708</span> <span class="py-line"><span class="py-docstring"> Add a selection to the set of selected options in a multi-select element using an option locator.</span> </span>
<span class="lineno"> 709</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 710</span> <span class="py-line"><span class="py-docstring"> @see #doSelect for details of option locators</span> </span>
<span class="lineno"> 711</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 712</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator identifying a multi-select box</span> </span>
<span class="lineno"> 713</span> <span class="py-line"><span class="py-docstring"> 'optionLocator' is an option locator (a label by default)</span> </span>
<span class="lineno"> 714</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 715</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"addSelection"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">optionLocator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 716</span> <span class="py-line"> </span>
<span class="lineno"> 717</span> <span class="py-line"> </span>
<a name="selenium.remove_selection"></a><div id="selenium.remove_selection-def"><span class="lineno"> 718</span> <a class="pysrc-toggle" href="#" id="selenium.remove_selection-toggle" onclick="toggle('selenium.remove_selection'); return false;">-</a><span class="py-line"> <span class="py-keyword">def</span> <a class="py-def-name" href="selenium.selenium-class.html#remove_selection">remove_selection</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span><span class="py-param">locator</span><span class="py-op">,</span><span class="py-param">optionLocator</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="selenium.remove_selection-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="selenium.remove_selection-expanded"><span class="lineno"> 719</span> <span class="py-line"> <span class="py-docstring">"""</span> </span>
<span class="lineno"> 720</span> <span class="py-line"><span class="py-docstring"> Remove a selection from the set of selected options in a multi-select element using an option locator.</span> </span>
<span class="lineno"> 721</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 722</span> <span class="py-line"><span class="py-docstring"> @see #doSelect for details of option locators</span> </span>
<span class="lineno"> 723</span> <span class="py-line"><span class="py-docstring"> </span> </span>
<span class="lineno"> 724</span> <span class="py-line"><span class="py-docstring"> 'locator' is an element locator identifying a multi-select box</span> </span>
<span class="lineno"> 725</span> <span class="py-line"><span class="py-docstring"> 'optionLocator' is an option locator (a label by default)</span> </span>
<span class="lineno"> 726</span> <span class="py-line"><span class="py-docstring"> """</span> </span>
<span class="lineno"> 727</span> <span class="py-line"> <span class="py-name">self</span><span class="py-op">.</span><a title="selenium.selenium.do_command" class="py-name" href="selenium.selenium-class.html#do_command">do_command</a><span class="py-op">(</span><span class="py-string">"removeSelection"</span><span class="py-op">,</span> <span class="py-op">[</span><span class="py-name">locator</span><span class="py-op">,</span><span class="py-name">optionLocator</span><span class="py-op">,</span><span class="py-op">]</span><span class="py-op">)</span> </span>
</div><span class="lineno"> 728</span> <span class="py-line"> </span>
<span class="lineno"> 729</span> <span class="py-line"> </span>
<a name="selenium.remove_all_selections"></a><div id="selenium.remove_all_selections-def"><span class="lineno"> 730</span> <a class="pysrc-toggle"