Skip to content

Commit

Permalink
updating py docs for 2.37 release
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeis committed Oct 18, 2013
1 parent ba4f854 commit a7c61cb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
8 changes: 4 additions & 4 deletions docs/api/py/_sources/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ If you have `pip <http://www.pip-installer.org>`_ on your system, you can simply

pip install -U selenium

Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-2.36.tar.gz), unarchive it, and run::
Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-2.37.tar.gz), unarchive it, and run::

python setup.py install

Expand Down Expand Up @@ -70,7 +70,7 @@ Example 1:

browser = webdriver.Firefox()

browser.get('http://www.yahoo.com)
browser.get('http://www.yahoo.com')
assert 'Yahoo!' in browser.title

elem = browser.find_element_by_name('p') # Find the search box
Expand Down Expand Up @@ -107,11 +107,11 @@ For normal WebDriver scripts (non-Remote), the Java server is not needed.

However, to use Selenium Webdriver Remote or the legacy Selenium API (Selenium-RC), you need to also run the Selenium server. The server requires a Java Runtime Environment (JRE).

Download the server separately, from: http://selenium.googlecode.com/files/selenium-server-standalone-2.36.0.jar
Download the server separately, from: http://selenium.googlecode.com/files/selenium-server-standalone-2.37.0.jar

Run the server from the command line::

java -jar selenium-server-standalone-2.36.0.jar
java -jar selenium-server-standalone-2.37.0.jar

Then run your Python client scripts.

Expand Down
23 changes: 12 additions & 11 deletions docs/api/py/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h2>Installing<a class="headerlink" href="#installing" title="Permalink to this
<p>If you have <a class="reference external" href="http://www.pip-installer.org">pip</a> on your system, you can simply install or upgrade the Python bindings:</p>
<div class="highlight-python"><pre>pip install -U selenium</pre>
</div>
<p>Alternately, you can download the source distribution from <a class="reference external" href="http://pypi.python.org/pypi/selenium">PyPI</a> (e.g. selenium-2.36.tar.gz), unarchive it, and run:</p>
<p>Alternately, you can download the source distribution from <a class="reference external" href="http://pypi.python.org/pypi/selenium">PyPI</a> (e.g. selenium-2.37.tar.gz), unarchive it, and run:</p>
<div class="highlight-python"><pre>python setup.py install</pre>
</div>
<p>Note: both of the methods described above install <cite>selenium</cite> as a system-wide package That will require administrative/root access to ther machine. You may consider using a <a class="reference external" href="http://www.virtualenv.org/">virtualenv</a> to create isolated Python environments instead.</p>
Expand All @@ -113,18 +113,19 @@ <h2>Example 1:<a class="headerlink" href="#example-1" title="Permalink to this h
<li>search for &#8220;seleniumhq&#8221;</li>
<li>close the browser</li>
</ul>
<div class="highlight-python"><pre>from selenium import webdriver
from selenium.webdriver.common.keys import Keys
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">selenium</span> <span class="kn">import</span> <span class="n">webdriver</span>
<span class="kn">from</span> <span class="nn">selenium.webdriver.common.keys</span> <span class="kn">import</span> <span class="n">Keys</span>

browser = webdriver.Firefox()
<span class="n">browser</span> <span class="o">=</span> <span class="n">webdriver</span><span class="o">.</span><span class="n">Firefox</span><span class="p">()</span>

browser.get('http://www.yahoo.com)
assert 'Yahoo!' in browser.title
<span class="n">browser</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;http://www.yahoo.com&#39;</span><span class="p">)</span>
<span class="k">assert</span> <span class="s">&#39;Yahoo!&#39;</span> <span class="ow">in</span> <span class="n">browser</span><span class="o">.</span><span class="n">title</span>

elem = browser.find_element_by_name('p') # Find the search box
elem.send_keys('seleniumhq' + Keys.RETURN)
<span class="n">elem</span> <span class="o">=</span> <span class="n">browser</span><span class="o">.</span><span class="n">find_element_by_name</span><span class="p">(</span><span class="s">&#39;p&#39;</span><span class="p">)</span> <span class="c"># Find the search box</span>
<span class="n">elem</span><span class="o">.</span><span class="n">send_keys</span><span class="p">(</span><span class="s">&#39;seleniumhq&#39;</span> <span class="o">+</span> <span class="n">Keys</span><span class="o">.</span><span class="n">RETURN</span><span class="p">)</span>

browser.quit()</pre>
<span class="n">browser</span><span class="o">.</span><span class="n">quit</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="example-2">
Expand All @@ -151,9 +152,9 @@ <h2>Example 2:<a class="headerlink" href="#example-2" title="Permalink to this h
<h2>Selenium Server (optional)<a class="headerlink" href="#selenium-server-optional" title="Permalink to this headline"></a></h2>
<p>For normal WebDriver scripts (non-Remote), the Java server is not needed.</p>
<p>However, to use Selenium Webdriver Remote or the legacy Selenium API (Selenium-RC), you need to also run the Selenium server. The server requires a Java Runtime Environment (JRE).</p>
<p>Download the server separately, from: <a class="reference external" href="http://selenium.googlecode.com/files/selenium-server-standalone-2.36.0.jar">http://selenium.googlecode.com/files/selenium-server-standalone-2.36.0.jar</a></p>
<p>Download the server separately, from: <a class="reference external" href="http://selenium.googlecode.com/files/selenium-server-standalone-2.37.0.jar">http://selenium.googlecode.com/files/selenium-server-standalone-2.37.0.jar</a></p>
<p>Run the server from the command line:</p>
<div class="highlight-python"><pre>java -jar selenium-server-standalone-2.36.0.jar</pre>
<div class="highlight-python"><pre>java -jar selenium-server-standalone-2.37.0.jar</pre>
</div>
<p>Then run your Python client scripts.</p>
</div>
Expand Down
Binary file modified docs/api/py/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/api/py/searchindex.js

Large diffs are not rendered by default.

0 comments on commit a7c61cb

Please sign in to comment.