Skip to content

Commit

Permalink
updating pythong for 2.38 and updating api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeis committed Dec 5, 2013
1 parent 24b0b28 commit aa3cce2
Show file tree
Hide file tree
Showing 19 changed files with 95 additions and 139 deletions.
2 changes: 1 addition & 1 deletion docs/api/py/_modules/selenium/selenium.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ <h1>Source code for selenium.selenium</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">sessionId</span> <span class="o">=</span> <span class="bp">None</span>

<span class="k">def</span> <span class="nf">do_command</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">verb</span><span class="p">,</span> <span class="n">args</span><span class="p">):</span></div>
<div class="viewcode-block" id="selenium.do_command"><a class="viewcode-back" href="../../selenium/selenium.selenium.html#selenium.selenium.selenium.do_command">[docs]</a> <span class="n">conn</span> <span class="o">=</span> <span class="n">http_client</span><span class="o">.</span><span class="n">HTTPConnection</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">host</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">port</span><span class="p">)</span>
<div class="viewcode-block" id="selenium.do_command"><a class="viewcode-back" href="../../selenium/selenium.selenium.html#selenium.selenium.selenium.do_command">[docs]</a> <span class="n">conn</span> <span class="o">=</span> <span class="n">http_client</span><span class="o">.</span><span class="n">HTTPConnection</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">host</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">port</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="mi">30</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">body</span> <span class="o">=</span> <span class="s">&#39;cmd=&#39;</span> <span class="o">+</span> <span class="n">urllib_parse</span><span class="o">.</span><span class="n">quote_plus</span><span class="p">(</span><span class="nb">unicode</span><span class="p">(</span><span class="n">verb</span><span class="p">)</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s">&#39;utf-8&#39;</span><span class="p">))</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)):</span>
Expand Down
2 changes: 2 additions & 0 deletions docs/api/py/_modules/selenium/webdriver/common/proxy.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ <h1>Source code for selenium.webdriver.common.proxy</h1><div class="highlight"><

<span class="nd">@classmethod</span>
<div class="viewcode-block" id="ProxyType.load"><a class="viewcode-back" href="../../../../webdriver/selenium.webdriver.common.proxy.html#selenium.webdriver.common.proxy.ProxyType.load">[docs]</a> <span class="k">def</span> <span class="nf">load</span><span class="p">(</span><span class="n">cls</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="nb">dict</span><span class="p">)</span> <span class="ow">and</span> <span class="n">value</span><span class="o">.</span><span class="n">has_key</span><span class="p">(</span><span class="s">&#39;string&#39;</span><span class="p">):</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">value</span><span class="p">[</span><span class="s">&#39;string&#39;</span><span class="p">]</span>
<span class="n">value</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
<span class="k">for</span> <span class="n">attr</span> <span class="ow">in</span> <span class="nb">dir</span><span class="p">(</span><span class="n">cls</span><span class="p">):</span>
<span class="n">attr_value</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">cls</span><span class="p">,</span> <span class="n">attr</span><span class="p">)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ <h1>Source code for selenium.webdriver.firefox.firefox_profile</h1><div class="h
<div class="viewcode-block" id="FirefoxProfile"><a class="viewcode-back" href="../../../../webdriver_firefox/selenium.webdriver.firefox.firefox_profile.html#selenium.webdriver.firefox.firefox_profile.FirefoxProfile">[docs]</a><span class="k">class</span> <span class="nc">FirefoxProfile</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>

<span class="n">ANONYMOUS_PROFILE_NAME</span> <span class="o">=</span> <span class="s">&quot;WEBDRIVER_ANONYMOUS_PROFILE&quot;</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">__file__</span><span class="p">),</span> <span class="n">WEBDRIVER_PREFERENCES</span><span class="p">))</span> <span class="k">as</span> <span class="n">default_prefs</span><span class="p">:</span>
<span class="n">DEFAULT_PREFERENCES</span> <span class="o">=</span> <span class="n">json</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">default_prefs</span><span class="p">)</span>

<span class="n">DEFAULT_PREFERENCES</span> <span class="o">=</span> <span class="bp">None</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">profile_directory</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
Expand All @@ -104,8 +102,14 @@ <h1>Source code for selenium.webdriver.firefox.firefox_profile</h1><div class="h
<span class="sd"> This defaults to None and will create a new</span>
<span class="sd"> directory when object is created.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">FirefoxProfile</span><span class="o">.</span><span class="n">DEFAULT_PREFERENCES</span><span class="p">:</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">__file__</span><span class="p">),</span>
<span class="n">WEBDRIVER_PREFERENCES</span><span class="p">))</span> <span class="k">as</span> <span class="n">default_prefs</span><span class="p">:</span>
<span class="n">FirefoxProfile</span><span class="o">.</span><span class="n">DEFAULT_PREFERENCES</span> <span class="o">=</span> <span class="n">json</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">default_prefs</span><span class="p">)</span>

<span class="bp">self</span><span class="o">.</span><span class="n">default_preferences</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span>
<span class="n">FirefoxProfile</span><span class="o">.</span><span class="n">DEFAULT_PREFERENCES</span><span class="p">[</span><span class="s">&#39;mutable&#39;</span><span class="p">])</span>
<span class="bp">self</span><span class="o">.</span><span class="n">native_events_enabled</span> <span class="o">=</span> <span class="bp">True</span>
<span class="bp">self</span><span class="o">.</span><span class="n">profile_dir</span> <span class="o">=</span> <span class="n">profile_directory</span>
<span class="bp">self</span><span class="o">.</span><span class="n">tempfolder</span> <span class="o">=</span> <span class="bp">None</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">profile_dir</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ <h1>Source code for selenium.webdriver.phantomjs.service</h1><div class="highlig
<span class="c"># limitations under the License.</span>
<span class="kn">import</span> <span class="nn">subprocess</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">import</span> <span class="nn">signal</span>

<span class="kn">from</span> <span class="nn">selenium.common.exceptions</span> <span class="kn">import</span> <span class="n">WebDriverException</span>
<span class="kn">from</span> <span class="nn">selenium.webdriver.common</span> <span class="kn">import</span> <span class="n">utils</span>
Expand Down Expand Up @@ -140,7 +141,7 @@ <h1>Source code for selenium.webdriver.phantomjs.service</h1><div class="highlig
<span class="c">#Tell the Server to properly die in case</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">process</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">process</span><span class="o">.</span><span class="n">kill</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">process</span><span class="o">.</span><span class="n">send_signal</span><span class="p">(</span><span class="n">signal</span><span class="o">.</span><span class="n">SIGTERM</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">process</span><span class="o">.</span><span class="n">wait</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">OSError</span><span class="p">:</span>
<span class="c"># kill may not be available under windows environment</span>
Expand Down
5 changes: 0 additions & 5 deletions docs/api/py/_modules/selenium/webdriver/remote/command.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,10 @@ <h1>Source code for selenium.webdriver.remote.command</h1><div class="highlight"
<span class="n">FIND_CHILD_ELEMENTS</span> <span class="o">=</span> <span class="s">&quot;findChildElements&quot;</span>
<span class="n">CLEAR_ELEMENT</span> <span class="o">=</span> <span class="s">&quot;clearElement&quot;</span>
<span class="n">CLICK_ELEMENT</span> <span class="o">=</span> <span class="s">&quot;clickElement&quot;</span>
<span class="n">HOVER_OVER_ELEMENT</span> <span class="o">=</span> <span class="s">&quot;hoverOverElement&quot;</span>
<span class="n">SEND_KEYS_TO_ELEMENT</span> <span class="o">=</span> <span class="s">&quot;sendKeysToElement&quot;</span>
<span class="n">SEND_KEYS_TO_ACTIVE_ELEMENT</span> <span class="o">=</span> <span class="s">&quot;sendKeysToActiveElement&quot;</span>
<span class="n">SUBMIT_ELEMENT</span> <span class="o">=</span> <span class="s">&quot;submitElement&quot;</span>
<span class="n">UPLOAD_FILE</span> <span class="o">=</span> <span class="s">&quot;uploadFile&quot;</span>
<span class="n">TOGGLE_ELEMENT</span> <span class="o">=</span> <span class="s">&quot;toggleElement&quot;</span>
<span class="n">GET_CURRENT_WINDOW_HANDLE</span> <span class="o">=</span> <span class="s">&quot;getCurrentWindowHandle&quot;</span>
<span class="n">GET_WINDOW_HANDLES</span> <span class="o">=</span> <span class="s">&quot;getWindowHandles&quot;</span>
<span class="n">GET_WINDOW_SIZE</span> <span class="o">=</span> <span class="s">&quot;getWindowSize&quot;</span>
Expand All @@ -115,15 +113,12 @@ <h1>Source code for selenium.webdriver.remote.command</h1><div class="highlight"
<span class="n">GET_PAGE_SOURCE</span> <span class="o">=</span> <span class="s">&quot;getPageSource&quot;</span>
<span class="n">GET_TITLE</span> <span class="o">=</span> <span class="s">&quot;getTitle&quot;</span>
<span class="n">EXECUTE_SCRIPT</span> <span class="o">=</span> <span class="s">&quot;executeScript&quot;</span>
<span class="n">GET_SPEED</span> <span class="o">=</span> <span class="s">&quot;getSpeed&quot;</span>
<span class="n">SET_SPEED</span> <span class="o">=</span> <span class="s">&quot;setSpeed&quot;</span>
<span class="n">SET_BROWSER_VISIBLE</span> <span class="o">=</span> <span class="s">&quot;setBrowserVisible&quot;</span>
<span class="n">IS_BROWSER_VISIBLE</span> <span class="o">=</span> <span class="s">&quot;isBrowserVisible&quot;</span>
<span class="n">GET_ELEMENT_TEXT</span> <span class="o">=</span> <span class="s">&quot;getElementText&quot;</span>
<span class="n">GET_ELEMENT_VALUE</span> <span class="o">=</span> <span class="s">&quot;getElementValue&quot;</span>
<span class="n">GET_ELEMENT_TAG_NAME</span> <span class="o">=</span> <span class="s">&quot;getElementTagName&quot;</span>
<span class="n">SET_ELEMENT_SELECTED</span> <span class="o">=</span> <span class="s">&quot;setElementSelected&quot;</span>
<span class="n">DRAG_ELEMENT</span> <span class="o">=</span> <span class="s">&quot;dragElement&quot;</span>
<span class="n">IS_ELEMENT_SELECTED</span> <span class="o">=</span> <span class="s">&quot;isElementSelected&quot;</span>
<span class="n">IS_ELEMENT_ENABLED</span> <span class="o">=</span> <span class="s">&quot;isElementEnabled&quot;</span>
<span class="n">IS_ELEMENT_DISPLAYED</span> <span class="o">=</span> <span class="s">&quot;isElementDisplayed&quot;</span>
Expand Down
Loading

0 comments on commit aa3cce2

Please sign in to comment.