forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forgot to add the new files for python docs
- Loading branch information
AutomatedTester
committed
May 27, 2014
1 parent
f08b7ea
commit 0dce277
Showing
6 changed files
with
555 additions
and
0 deletions.
There are no files selected for viewing
131 changes: 131 additions & 0 deletions
131
docs/api/py/_modules/selenium/webdriver/android/webdriver.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
|
||
<title>selenium.webdriver.android.webdriver — Selenium 2.0 documentation</title> | ||
|
||
<link rel="stylesheet" href="../../../../_static/default.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" /> | ||
|
||
<script type="text/javascript"> | ||
var DOCUMENTATION_OPTIONS = { | ||
URL_ROOT: '../../../../', | ||
VERSION: '2.0', | ||
COLLAPSE_INDEX: false, | ||
FILE_SUFFIX: '.html', | ||
HAS_SOURCE: true | ||
}; | ||
</script> | ||
<script type="text/javascript" src="../../../../_static/jquery.js"></script> | ||
<script type="text/javascript" src="../../../../_static/underscore.js"></script> | ||
<script type="text/javascript" src="../../../../_static/doctools.js"></script> | ||
<link rel="top" title="Selenium 2.0 documentation" href="../../../../index.html" /> | ||
<link rel="up" title="Module code" href="../../../index.html" /> | ||
</head> | ||
<body> | ||
<div class="related"> | ||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="right" style="margin-right: 10px"> | ||
<a href="../../../../genindex.html" title="General Index" | ||
accesskey="I">index</a></li> | ||
<li class="right" > | ||
<a href="../../../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../../../../index.html">Selenium 2.0 documentation</a> »</li> | ||
<li><a href="../../../index.html" accesskey="U">Module code</a> »</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="document"> | ||
<div class="documentwrapper"> | ||
<div class="bodywrapper"> | ||
<div class="body"> | ||
|
||
<h1>Source code for selenium.webdriver.android.webdriver</h1><div class="highlight"><pre> | ||
<span class="c">#!/usr/bin/python</span> | ||
<span class="c">#</span> | ||
<span class="c"># Copyright 2014 Software freedom conservancy</span> | ||
<span class="c">#</span> | ||
<span class="c"># Licensed under the Apache License, Version 2.0 (the "License");</span> | ||
<span class="c"># you may not use this file except in compliance with the License.</span> | ||
<span class="c"># You may obtain a copy of the License at</span> | ||
<span class="c">#</span> | ||
<span class="c"># http://www.apache.org/licenses/LICENSE-2.0</span> | ||
<span class="c">#</span> | ||
<span class="c"># Unless required by applicable law or agreed to in writing, software</span> | ||
<span class="c"># distributed under the License is distributed on an "AS IS" BASIS,</span> | ||
<span class="c"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> | ||
<span class="c"># See the License for the specific language governing permissions and</span> | ||
<span class="c"># limitations under the License.</span> | ||
|
||
<span class="kn">import</span> <span class="nn">base64</span> | ||
<span class="kn">from</span> <span class="nn">selenium.webdriver.remote.webdriver</span> <span class="kn">import</span> <span class="n">WebDriver</span> <span class="k">as</span> <span class="n">RemoteWebDriver</span> | ||
<span class="kn">from</span> <span class="nn">selenium.webdriver.common.desired_capabilities</span> <span class="kn">import</span> <span class="n">DesiredCapabilities</span> | ||
|
||
<div class="viewcode-block" id="WebDriver"><a class="viewcode-back" href="../../../../webdriver_android/selenium.webdriver.android.webdriver.html#selenium.webdriver.android.webdriver.WebDriver">[docs]</a><span class="k">class</span> <span class="nc">WebDriver</span><span class="p">(</span><span class="n">RemoteWebDriver</span><span class="p">):</span> | ||
<span class="sd">"""</span> | ||
<span class="sd"> Simple RemoteWebDriver wrapper to start connect to Selendroid's WebView app</span> | ||
|
||
<span class="sd"> For more info on getting started with Selendroid</span> | ||
<span class="sd"> http://selendroid.io/mobileWeb.html</span> | ||
<span class="sd"> """</span> | ||
|
||
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">host</span><span class="o">=</span><span class="s">"localhost"</span><span class="p">,</span> <span class="n">port</span><span class="o">=</span><span class="mi">4444</span><span class="p">,</span> <span class="n">desired_capabilities</span><span class="o">=</span><span class="n">DesiredCapabilities</span><span class="o">.</span><span class="n">ANDROID</span><span class="p">):</span> | ||
<span class="sd">"""</span> | ||
<span class="sd"> Creates a new instance of Selendroid using the WebView app</span> | ||
|
||
<span class="sd"> :Args:</span> | ||
<span class="sd"> - host - location of where selendroid is running</span> | ||
<span class="sd"> - port - port that selendroid is running on</span> | ||
<span class="sd"> - desired_capabilities: Dictionary object with capabilities</span> | ||
<span class="sd"> """</span> | ||
<span class="n">RemoteWebDriver</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> | ||
<span class="n">command_executor</span><span class="o">=</span><span class="s">"http://</span><span class="si">%s</span><span class="s">:</span><span class="si">%d</span><span class="s">/wd/hub"</span> <span class="o">%</span> <span class="p">(</span><span class="n">host</span><span class="p">,</span> <span class="n">port</span><span class="p">),</span> | ||
<span class="n">desired_capabilities</span><span class="o">=</span><span class="n">desired_capabilities</span><span class="p">)</span> | ||
</pre></div></div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<div class="sphinxsidebar"> | ||
<div class="sphinxsidebarwrapper"> | ||
<div id="searchbox" style="display: none"> | ||
<h3>Quick search</h3> | ||
<form class="search" action="../../../../search.html" method="get"> | ||
<input type="text" name="q" /> | ||
<input type="submit" value="Go" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
<p class="searchtip" style="font-size: 90%"> | ||
Enter search terms or a module, class or function name. | ||
</p> | ||
</div> | ||
<script type="text/javascript">$('#searchbox').show(0);</script> | ||
</div> | ||
</div> | ||
<div class="clearer"></div> | ||
</div> | ||
<div class="related"> | ||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="right" style="margin-right: 10px"> | ||
<a href="../../../../genindex.html" title="General Index" | ||
>index</a></li> | ||
<li class="right" > | ||
<a href="../../../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../../../../index.html">Selenium 2.0 documentation</a> »</li> | ||
<li><a href="../../../index.html" >Module code</a> »</li> | ||
</ul> | ||
</div> | ||
<div class="footer"> | ||
© Copyright 2011, plightbo, simon.m.stewart, hbchai, jrhuggins, et al.. | ||
</div> | ||
</body> | ||
</html> |
145 changes: 145 additions & 0 deletions
145
docs/api/py/_modules/selenium/webdriver/remote/mobile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
|
||
<title>selenium.webdriver.remote.mobile — Selenium 2.0 documentation</title> | ||
|
||
<link rel="stylesheet" href="../../../../_static/default.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" /> | ||
|
||
<script type="text/javascript"> | ||
var DOCUMENTATION_OPTIONS = { | ||
URL_ROOT: '../../../../', | ||
VERSION: '2.0', | ||
COLLAPSE_INDEX: false, | ||
FILE_SUFFIX: '.html', | ||
HAS_SOURCE: true | ||
}; | ||
</script> | ||
<script type="text/javascript" src="../../../../_static/jquery.js"></script> | ||
<script type="text/javascript" src="../../../../_static/underscore.js"></script> | ||
<script type="text/javascript" src="../../../../_static/doctools.js"></script> | ||
<link rel="top" title="Selenium 2.0 documentation" href="../../../../index.html" /> | ||
<link rel="up" title="Module code" href="../../../index.html" /> | ||
</head> | ||
<body> | ||
<div class="related"> | ||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="right" style="margin-right: 10px"> | ||
<a href="../../../../genindex.html" title="General Index" | ||
accesskey="I">index</a></li> | ||
<li class="right" > | ||
<a href="../../../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../../../../index.html">Selenium 2.0 documentation</a> »</li> | ||
<li><a href="../../../index.html" accesskey="U">Module code</a> »</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="document"> | ||
<div class="documentwrapper"> | ||
<div class="bodywrapper"> | ||
<div class="body"> | ||
|
||
<h1>Source code for selenium.webdriver.remote.mobile</h1><div class="highlight"><pre> | ||
<span class="c"># Copyright 2014 Software freedom conservancy</span> | ||
<span class="c">#</span> | ||
<span class="c"># Licensed under the Apache License, Version 2.0 (the "License");</span> | ||
<span class="c"># you may not use this file except in compliance with the License.</span> | ||
<span class="c"># You may obtain a copy of the License at</span> | ||
<span class="c">#</span> | ||
<span class="c"># http://www.apache.org/licenses/LICENSE-2.0</span> | ||
<span class="c">#</span> | ||
<span class="c"># Unless required by applicable law or agreed to in writing, software</span> | ||
<span class="c"># distributed under the License is distributed on an "AS IS" BASIS,</span> | ||
<span class="c"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> | ||
<span class="c"># See the License for the specific language governing permissions and</span> | ||
<span class="c"># limitations under the License.</span> | ||
|
||
<span class="kn">from</span> <span class="nn">.command</span> <span class="kn">import</span> <span class="n">Command</span> | ||
<span class="kn">from</span> <span class="nn">selenium.common.exceptions</span> <span class="kn">import</span> <span class="n">WebDriverException</span> | ||
|
||
<div class="viewcode-block" id="Mobile"><a class="viewcode-back" href="../../../../webdriver_remote/selenium.webdriver.remote.mobile.html#selenium.webdriver.remote.mobile.Mobile">[docs]</a><span class="k">class</span> <span class="nc">Mobile</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span> | ||
|
||
<div class="viewcode-block" id="Mobile.ConnectionType"><a class="viewcode-back" href="../../../../webdriver_remote/selenium.webdriver.remote.mobile.html#selenium.webdriver.remote.mobile.Mobile.ConnectionType">[docs]</a> <span class="k">class</span> <span class="nc">ConnectionType</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span> | ||
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mask</span><span class="p">):</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">mask</span> <span class="o">=</span> <span class="n">mask</span> | ||
<span class="nd">@property</span> | ||
<div class="viewcode-block" id="Mobile.ConnectionType.airplane_mode"><a class="viewcode-back" href="../../../../webdriver_remote/selenium.webdriver.remote.mobile.html#selenium.webdriver.remote.mobile.Mobile.ConnectionType.airplane_mode">[docs]</a> <span class="k">def</span> <span class="nf">airplane_mode</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> | ||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mask</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">1</span></div> | ||
<span class="nd">@property</span> | ||
<div class="viewcode-block" id="Mobile.ConnectionType.wifi"><a class="viewcode-back" href="../../../../webdriver_remote/selenium.webdriver.remote.mobile.html#selenium.webdriver.remote.mobile.Mobile.ConnectionType.wifi">[docs]</a> <span class="k">def</span> <span class="nf">wifi</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> | ||
<span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mask</span> <span class="o">/</span> <span class="mi">2</span><span class="p">)</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">1</span></div> | ||
<span class="nd">@property</span> | ||
<div class="viewcode-block" id="Mobile.ConnectionType.data"><a class="viewcode-back" href="../../../../webdriver_remote/selenium.webdriver.remote.mobile.html#selenium.webdriver.remote.mobile.Mobile.ConnectionType.data">[docs]</a> <span class="k">def</span> <span class="nf">data</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> | ||
<span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mask</span> <span class="o">/</span> <span class="mi">4</span><span class="p">)</span> <span class="o">></span> <span class="mi">0</span> | ||
</div></div> | ||
<span class="n">ALL_NETWORK</span> <span class="o">=</span> <span class="n">ConnectionType</span><span class="p">(</span><span class="mi">6</span><span class="p">)</span> | ||
<span class="n">WIFI_NETWORK</span> <span class="o">=</span> <span class="n">ConnectionType</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> | ||
<span class="n">DATA_NETWORK</span> <span class="o">=</span> <span class="n">ConnectionType</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span> | ||
<span class="n">AIRPLANE_MODE</span> <span class="o">=</span> <span class="n">ConnectionType</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> | ||
|
||
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">driver</span><span class="p">):</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">_driver</span> <span class="o">=</span> <span class="n">driver</span> | ||
|
||
<span class="nd">@property</span> | ||
<div class="viewcode-block" id="Mobile.network_connection"><a class="viewcode-back" href="../../../../webdriver_remote/selenium.webdriver.remote.mobile.html#selenium.webdriver.remote.mobile.Mobile.network_connection">[docs]</a> <span class="k">def</span> <span class="nf">network_connection</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> | ||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">ConnectionType</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_driver</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="n">Command</span><span class="o">.</span><span class="n">GET_NETWORK_CONNECTION</span><span class="p">)[</span><span class="s">'value'</span><span class="p">])</span> | ||
</div> | ||
<div class="viewcode-block" id="Mobile.set_network_connection"><a class="viewcode-back" href="../../../../webdriver_remote/selenium.webdriver.remote.mobile.html#selenium.webdriver.remote.mobile.Mobile.set_network_connection">[docs]</a> <span class="k">def</span> <span class="nf">set_network_connection</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">network</span><span class="p">):</span> | ||
<span class="sd">"""</span> | ||
<span class="sd"> Set the network connection for the remote device.</span> | ||
<span class="sd"> Example of setting airplane mode:</span> | ||
<span class="sd"> driver.mobile.set_network_connection(driver.mobile.AIRPLANE_MODE)</span> | ||
<span class="sd"> """</span> | ||
<span class="n">mode</span> <span class="o">=</span> <span class="n">network</span><span class="o">.</span><span class="n">mask</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">network</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">ConnectionType</span><span class="p">)</span> <span class="k">else</span> <span class="n">network</span> | ||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">ConnectionType</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_driver</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="n">Command</span><span class="o">.</span><span class="n">SET_NETWORK_CONNECTION</span><span class="p">,</span> | ||
<span class="p">{</span><span class="s">'name'</span><span class="p">:</span><span class="s">'network_connection'</span><span class="p">,</span> | ||
<span class="s">'parameters'</span><span class="p">:{</span><span class="s">'type'</span><span class="p">:</span> <span class="n">mode</span><span class="p">}})[</span><span class="s">'value'</span><span class="p">])</span></div></div> | ||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<div class="sphinxsidebar"> | ||
<div class="sphinxsidebarwrapper"> | ||
<div id="searchbox" style="display: none"> | ||
<h3>Quick search</h3> | ||
<form class="search" action="../../../../search.html" method="get"> | ||
<input type="text" name="q" /> | ||
<input type="submit" value="Go" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
<p class="searchtip" style="font-size: 90%"> | ||
Enter search terms or a module, class or function name. | ||
</p> | ||
</div> | ||
<script type="text/javascript">$('#searchbox').show(0);</script> | ||
</div> | ||
</div> | ||
<div class="clearer"></div> | ||
</div> | ||
<div class="related"> | ||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="right" style="margin-right: 10px"> | ||
<a href="../../../../genindex.html" title="General Index" | ||
>index</a></li> | ||
<li class="right" > | ||
<a href="../../../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../../../../index.html">Selenium 2.0 documentation</a> »</li> | ||
<li><a href="../../../index.html" >Module code</a> »</li> | ||
</ul> | ||
</div> | ||
<div class="footer"> | ||
© Copyright 2011, plightbo, simon.m.stewart, hbchai, jrhuggins, et al.. | ||
</div> | ||
</body> | ||
</html> |
4 changes: 4 additions & 0 deletions
4
docs/api/py/_sources/webdriver_android/selenium.webdriver.android.webdriver.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
selenium.webdriver.android.webdriver | ||
==================================== | ||
|
||
.. automodule:: selenium.webdriver.android.webdriver |
4 changes: 4 additions & 0 deletions
4
docs/api/py/_sources/webdriver_remote/selenium.webdriver.remote.mobile.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
selenium.webdriver.remote.mobile | ||
================================ | ||
|
||
.. automodule:: selenium.webdriver.remote.mobile |
Oops, something went wrong.