diff -Nru selenium-firefoxdriver-2.53.2/CHANGES selenium-firefoxdriver-3.8.0/CHANGES --- selenium-firefoxdriver-2.53.2/CHANGES 1970-01-01 00:00:00.000000000 +0000 +++ selenium-firefoxdriver-3.8.0/CHANGES 2017-11-28 15:42:50.000000000 +0000 @@ -0,0 +1,594 @@ +Selenium 3.8.0 + +* Firefox options can now be imported from selenium.webdriver as FirefoxOptions (#5120) +* Headless mode can now be set in Chrome Options using `set_headless` +* Headless mode can now be set in Firefox Options using `set_headless` +* Add the WebKitGTK WebDriver and options class (#4635) +* Browser options can now be passed to remote WebDriver via the `options` parameter +* Browser option parameters are now standardized across drivers as `options`. `firefox_options`, + `chrome_options`, and `ie_options` are now deprecated +* Added missing W3C Error Codes (#4556) +* Support has been removed for Python versions 2.6 and 3.3 + +Selenium 3.7.0 + +* need to pass applicable environment variables to tox +* Fix active_element for w3c drivers (#3979) +* add support for minimize command +* add support for fullscreen command +* window rect commands should fail on firefox and remote (legacy) +* Fix python backward compatibility for window commands (#4937) +* Update docstrings to specify the type of path needed to install firefox addons. (#4881) +* Update python chromeOptions key for capabilities (#4622) +* Fix python pause action implementation (#4795) + +Selenium 3.6.0 + +* Fix package name in python webelement module (#4670) +* Fix python driver examples (#3872) +* No need to multiply pause by 1000 +* Add pause to action chains +* only check for proxyType once +* lowercase proxy type for w3c payload in python #4574 +* guarding against null return value from find_elements in python #4555 +* remove unnecessary pytest marking, address flake8 issues +* allow IE WebDriver to accept IE Options +* add IE Options class +* convert OSS capabilities to W3C equivalent for W3C payload +* Add Safari to API docs + +Selenium 3.5.0 + +* Numerous test fixes +*Iterate over capabilities in a way to support py2.7 and py3 +* Fix W3C switching to window by name. +* Support GeckoDriver addon install/uninstall commands #4215. +* Move firefox_profile into moz:firefoxOptions. +* Filter non-W3C capability names out of alwaysMatch. +* Honor cmd line args passed to Service ctor (#4167) +* Add expected conditions based on URL to Python Expected Conditions #4160 +* Add network emulation to Chrome Python bindings (#4011) +* add warning when saving incorrectly named screenshot (#4141) + +Selenium 3.4.3 +* Fix EventFiringWebdriver and WebElement to raise AttributeError on missing attributes. (#4107) +* unwrap WebElements inside dicts + +Selenium 3.4.2 + +* translate move_by_offset command to w3c +* Update capabilities properly instead of assuming dict structure. Fixes #3927 +* Add missing file for Chrome options to API docs. +* Add Chrome options module to API docs. + +Selenium 3.4.1 +* Add back the ability to set profile when using Firefox 45ESR. Fixes #3897 + +Selenium 3.4.0 +* Correct usage of newSession around `firstMatch` and `alwaysMatch` +* Remove superfluous capabilities that are not needed +* Add expected condition that waits for all found elements to be visible (#3532) +* Allow methods wrapped by EventFiringWebDriver and EventFiringWebElement (#806) +* Dropping `javascriptEnabled` capability for real browsers +* Use W3C check from parent object instead of assuming from capabilities +* Bump example source distribution to match latest release. +* Replace TypeError with KeyError in remote webdriver error handler code (#3826) +* When testing Marionette use default capabilities in testing +* Conform to the api of urllib2 for adding header for a request (#3803) +* Add `text` key to alert#sendKeys parameters for W3C Endpoint +* Location once scrolled into view should use W3C executeScript endpoint not JSONWP +* Fixed the usage information in documentation of "save_screenshot". (#3804) +* Add Element Not Interactable exception +* Clean up imports in error handler +* flake8 cleanup + +Selenium 3.3.3 + +* make w3c execute_script commands unique + +Selenium 3.3.2 + +* Update window commands to use W3C End points +* Update Alert when in W3C mode to use W3C Endpoints +* Update to new W3C Execute Script end points +* Add setting/getting proxy details to Firefox Options +* Deprecate the use of browser profile when instantiating a session +* Update start session to handle the W3C New Session +* Add get/set window rect commands +* Add InvalidArgumentException +* When passing in `text` to send_keys, make sure we send a string not array +* Fix string decoding in remote connection (#3663) +* Fix indentation to satisfy PEP8 +* Try use old way of setting page load timeout if new way fails. Fixes #3654 +* fix file uploads for Firefox +* Run unit tests on Python 3.3, 3.4, and 3.5 (#3638) +* Fix indentation in double_click. +* Fix non-W3C page load timeout setting. + +Selenium 3.3.1 +* Fix encoding of basic auth header when using Python 3 Fixes #3622 +* Add initial unit test suite +* Update W3C Timeout setting to be in line with the specification +* support.ui.Select class inherits from object (#3067) +* fix bug in proxy constructor that some properties are not proper set (#3459) +* Fix flake8 issues (#3628) + +Selenium 3.3.0 +** Note ** If you are updating to this version, please also update GeckoDriver to v0.15.0 +* Fix python HTTPS encoding for python driver (#3379) +* Allow Firefox preferences to be set directly in Options +* Fix shutdown and process termination (#3263) +* Preventing exception if log_path is none or empty. Fixes #3128 +* Add the W3C capability to Firefox for accepting insecure certificates +* Initial implementation of Pointer Actions +* Only skip tests if driver name matches a directory name. +* Update calls that return a pure object with keys to look for 'value' key +* Initial W3C Actions support +* fix docs output directory + +Selenium 3.0.2 +* Add support for W3C Get Active Element +* Return when we use executeScript for faking WebElement.get_property +* Expand user paths and resolve absolute path for Chrome extensions +* Add support for verbose logging and custom path to EdgeDriver +* Update TakeElementScreenshot to match WebDriver specification +* Raise WebDriverException when FirefoxBinary fails to locate binary +* Fix getting IP for python 3 +* Write Service log to DEVNULL by default +* Only attempt to remove the Firefox profile path if one was specified +* Added context manager for chrome/content in Firefox + +Selenium 3.0.1 +* Fix regressions with python 3 +* Add support for Safari Technology Preview + +Selenium 3.0.0 +* new FirefoxDriver ctor precedence logic and moz:firefoxOptions support (#2882) +* Add W3C Set Window Position and W3C Get Window Position +* enable log path setting from firefox webdriver (#2700) +* Correct encoding of getAttribute.js and only load it once. Fixes #2785 +* Encode the isDisplayed atom and only load it once + +Selenium 3.0.0.b3 +* Use atoms for get_attribute and is_displayed when communicating with + a w3c compliant remote end. +* Make it possible to specialise web element + +Selenium 3.0.0.b2 +* Updated Marionette port argument to match other drivers. + +Selenium 3.0.0.b1 +* Fix basestring reference to work with python 3. Fixes #1820 +* Correct Length conditional when filtering in PhantomJS. Fixes #1817 +* Fix send keys when using PUA keys e.g. Keys.RIGHT #1839 +* Fix cookie file leak in PhantomJS #1854 +* Use the correct binary path when using Marionette +* Fixed: Unhelpful error message when PhantomJS exits. (#2173 #2168) +* Fix broken link to python documentation (#2159) +* Attempt to remove Firefox profile when using Marionette +* Ensure all capabilities are either within desiredCapabilities or requiredCapabilities +* Correct the expected capability name for the Firefox profile +* Add Firefox options to capabilities +* Visibility_of_all implies it only returns elements if all visible (#2052) +* Find visible elements (#2041) +* Pass the firefox_profile as a desired capability in the Python client when using a remote server +* Avoid checking exception details for invalid locators due to differences in server implementations +* Handle capabilities better with Marionette and GeckoDriver +* Updated the maxVersion of FirefoxDriver xpi maxVersion to work with Firefox 47.0.1 +* Remove Selenium RC support + +Selenium 2.53.0 +* Adding Options object for use with Python FirefoxDriver +* Fixed improper usage of super in exceptions module +* create a temp file for cookies in phantomjs if not specified +* Pass in the executable that FirefoxBinary finds to the service if there isnt one passed in as a kwarg or capability +* Applied some DRY and extracted out the keys_to_typing() +* Fix deselecting options in - - -Selenium 2.52.0 -* Fixing case where UnexpectedAlertException doesn't get the alert_text in the error object -* Firefox: Actually use launch_browser timeout Fixes #1300 - -Selenium 2.51.1 -* correcting bundling issue missing README.rst file - -Selenium 2.51.0 -* Firefox updates (see java changelog) - -Selenium 2.50.1 -* Fixing error message handling. Fixes issue #1497 -* Fixing error message handling. Fixes issue #1507 -* Update webelement to handle W3C commands for size/location and rect -* rewrite click scrolling tests to match the Java ones - -Selenium 2.50.0 -* handle potential URLError from sending shutdown, set self.process to None after it's already been quit -* Add support for submit() with W3C compliant endpoint - -Selenium 2.49.1 -* Ensure you can close stream before attempting to close it. -* message response may cause json loads ValueError when it's not actually json - and just a string (like the message that occurs when firefox driver thinks - another element will receive the click) -* Cleanup some error handling when sniffing what protocol you are speaking - -Selenium 2.49.0 -* Have Firefox service write to a file instead of PIPE -* on osx for firefox, fallback to checking homebrew install, if the default isn't there -* Added Firefox path variable for string placeholder -* Update README to show Python 3.2+ -* refactoring all the service classes to use a common one. -* Add Firefox specific command to switch context between Browser content and Browser chrome -* updating files after go copyright:update -* Use specificationLevel to know that we are speaking GeckoDriver -* Bug fixes: #1294, #1186 - -Selenium 2.48.0 -* Update error pulling to match spec when we encounter a spec compliant browser. -* Disable tests that are not working with Marionette when running Marionette tests -* Add the ability to run python marionette tests -* Python 3 compatibility for remote Authorization -* changing casing of children finding tests - -Selenium 2.47.3 -* Bring back py 3 support - -Selenium 2.47.2 -* Fix running Edge driver locally on win10 -* adding repr to WebDriver and WebElement - -Selenium 2.47.1 -* Fix the issue of deleting the profile when shutting down Firefox -* WebElement __eq__ compares against more types -* Issues fixed: 850 - -Selenium 2.47.0 -* Add in support for when communicating with a Spec compliant browsers -* Initial support for Edge using EdgeDriver -* Issues fixed: 818 - -Selenium 2.46.1 -* Adding ability to make remote call for webelement screenshots in accordance to the W3C spec -* Adding api to authenticate HTTP Auth modal dialogs via driver.switch_to.alert (beta) -* Add rebeccapurple to Color Object -* Add element screenshot -* Add service handler and minimal update to driver to use service for Marionette -* Add the ability to start FirefoxDriver backed with Marionette via a capability -* support socket timeout for connections -* free_port checks if port is available on all interfaces -* Allow error handling to handle both current errors and w3c errors -* Update find_elements to match spec -* phantomjs: service: remove unused import of signal -* phantomjs: add port information to WebDriverException -* Issues fixed (Github): 478, 612, 734, 780 - -Selenium 2.46.0 -* Firefox support up to 38 -* BlackBerry browser support -* remove Presto-Opera support -* firefox extension extraction fixes -* process management fixes with phantomjs -* Comparing remote web element for equality does not require a remote command -* Issues Fixed: (gcode) 8493, 8521, 8498, 8274, 8497, 5923 -* Issues Fixed: (github) 401 - -Selenium 2.45.0 -* Firefox support up to 35, support for native events up to 34. -* Make Opera driver support also the new Blink based Opera -* README: Fix the Yahoo example -* WebElement docstring fixes -* Add debugger_address option to the ChromeDriver options list to optionally instruct ChromeDriver to wait for the target devtools instance to be started at a given host:ip -* Set default value for PhantomJS process reference -* Allow setting of FileDetector for send_keys -* Pass info to TimeoutException in WebDriverWait -* Issues Fixed: 8065, 8310, 8539 - -Selenium 2.44.0 -* (previous release person forgot to add release notes! DAVID!) - -Selenium 2.43.0 -* Expand WebElement.get_attribute API docs -* firefox may be installed without admininstrator privileges - and therefore there may be no HKEY_LOCAL_MACHINE entry. Issue #7784 -* UnexpectedAlertPresentException should contain the alert text in python too. Issue #7745 -* don't mutate the global 'ignored exceptions', take a copy of the globally specified ones, change the - global to be a tuple instead. Issue #7725 -* raise exception when the firefox binary isn't actually found, which usually implies the upgrade failed (on windows) Issue #6092 ,#6847 -* Fixing NameError: global name 'options' is not defined. -* Remove unused import subprocess.PIPE -* Redirect Firefox output to /dev/null by default Fixes Issue #7677 -* More flexible management of http timeouts in Selenium RC python client -* Generate Python API docs for selenium.webdriver.chrome.options. Fixes issue #7471 -* Use 127.0.0.1 as localhost name resolving might fail on some systems - -Selenium 2.42.1 -* Fixed Py3 issues -* Make firefox_binary.py and firefox_profile.py not executable -* Make exceptions Python 3 compatible - -Selenium 2.42 -* Support for Firefox 29 Native Events -* "remote_url" and "remote_browser" parameters for "./go test_remote". -* missing __init__ in new android module -* issue #7304 Fix memory leak caused by __del__ in PhantomJS -* File upload using remotedriver on python3 -* Updating xpi install to align with mozprofile -* command_executor should also support unicode strings as well. - -Selenium 2.41 -* Support for Firefox 28 -* deprecating switch_to_* in favour of driver.switch_to.* - -Selenium 2.40 -* Support for Firefox 27 -* Fixes related to http connection -* Fix for phantomjs running on windows #6736 - -Selenium 2.39 -* Support for Firefox 26 - -Selenium 2.38.4 -* keep-alive can't be used for phantomjs / IE, fix for that and tested for py3 :) - -Selenium 2.38.3 -* really supporting py3 :) - -Selenium 2.38.2 -* py3 support (once again) - -Selenium 2.38.1 -* fix packaging problem where firefox/webdriver_prefs.json was missing - -Selenium 2.38 -* Support for Firefox 25 -* FirefoxProfile now using common webdriver.json instead of having our own copy in py - - behavior change to the preferences is that they now should be treated - like raw types rather than strings and allow the json library to translate - the types appropriated (e.g. True => true) - -* Set proper 'Accept' request header so that Python bindings work with some old WebDriver implementations that reply 404 to requests with no 'Accept' set. -* handle redirect response explicitly (since switching to using keep-alive) -* phantomjs service needs to really kill the spawned process Issue #5921 -* removing old api endpoints from command listing -* using keep-alive for remote connection -* adjusting phantomjs subprocess.Popen -* ActionsChains.send_keys should use /keys endpoint Issue #6348 -* fix TypeError in chrome_options.extensions for Python3.x - -* Other Bugs Fixed: #6531, #6513, #4569, #6454 - - -Selenium 2.37.2 -* fix regression added with unicode fix -* Bug fix #6360 - -Selenium 2.37.1 -* fix find_elements on webelement using unicode locators and py 2.7 - -Selenium 2.37 -* repackage with fix for Firefox native events on Linux -* fix issue with unicode By locators w/ python 2.7 #6430 - -Selenium 2.36 -* Added Safari WebDriver. Fixes issue 5352. -* fix platform for safari caps -* Convert all offsets/coordinates/speeds into integers -* Fix drag and drop by offset behaviour -* Fix initialization of Proxy by capabilities when proxyType is set -* Enable SOCKS proxy support -* Validation of passed locator for find_element(s) methods #5690 -* Adding support for /status, /sessions commands -* Doc fixes -* ability to set Chrome extensions by using base64 encoded strings #4013 -* fix logic regarding Select.select_by_visible_text #3910 -* Bugs fixed: #6165, #6231 - -Selenium 2.35 -* Remove duplicate 'get screenshot as file' methods. Add method 'get_screenshot_as_png' -* fixing UnicodeEncodeError on get attribute of webelement - -Selenium 2.34 -* Corrected webdriverbackedselenium session handling. Fixes issue 4283 -* Corrected use of basestring for python 3. Fixes issue 5924 -* Support for Firefox 22 -* Added support for logging from the browser -* corrected proxy handling on FirefoxProfile -* Corrected handling of chrome extensions. Fixes issue 5762 - -Selenium 2.33 -* getText() ignores elements in the -* Adding both official and informal string representations to Color object. -* Replace distutils.dir_util by shutil -* Allow finding firefox binary at ProgramFiles(x86) on windows(64 bit) -* Py3 compatible winreg import and content-type access - -Selenium 2.32 -* Support for FF20 Native Events -* Python 3 support -* Misc Python 3 patches -* Allow easy FirefoxBinary subclassing - -Selenium 2.31 -* Support for FF19 native events -* web element equality is now in conformance with other language bindings - -Selenium 2.30 -* Allow env to be specified for the chromedriver service -* Allow log path to be specified for phantomjs driver service. -* Bug Fixes: 4608 4940 4974 5034 5075 - -Selenium 2.29 -* Allow subclassing of driver and have the ability to send_keys Issue 4877, 5017 -* Simplifying save_screenshot and allow phantomjs to take screenshots - -Selenium 2.28 -* "null" can now be passed to executeScript -* Add transparent and extended colour keywords to color support module. Fixes issue 4866 - -Selenium 2.27 -* Added support for phantomjs / ghostdriver -* Fix python client, avoid duplicate chrome option items after reusing options class. Fixes Issue 4744. -* adding colour support to Python. fixes issue 4623 -* Adding log_path/service_log_path as named kwargs for chrome - -Selenium 2.26 -* Added location_when_scrolled_into_view - Bug 4357 -* Added new expected_conditions support module to be used with WebDriverWait - -Selenium 2.25 -* Jython 2.7 Support - Bug 3988 -* EventFiringWebDriver added to Support module - Bug 2267 -* Added IEDriverServer logging that can be accessed via desired capabilities -* Fixed by data being passed into find_elements - bug 3735 -* Removed deprecated ChromeDriver items around desiredcapabilites in favour of chrome options -* Added default values for a number of action_chains calls - -Selenium 2.24 -* Removing the ctypes approach of invoking IEDriver, you will need to download the IEDriverServer from - https://code.google.com/p/selenium/downloads/list - -Selenium 2.23 -* Support for FF13 native events - -Selenium 2.22 -* Moving IEDriver to be able to use IEDriverServer - -Selenium 2.21.3 -* Fix for File Upload to remote servers -* Better handling of typing in input=file. Bug 3831, 3736 -* Better handling of unicode URLS Bug 3740 - -Selenium 2.21.2 -* Fix typing to file input when not using Selenium Server. Bug 3736 - -Selenium 2.21.1 -* focusmanager.testmode messes with native events, removing it. - -Selenium 2.21 -* Local File upload capabilities for non-remote browser -* Adding maximize_window api call -* Updating default firefox profile to set focusmanager.testmode to true - see https://bugzilla.mozilla.org/show_bug.cgi?id=704583 -* bugs fixed: 3506, 3528, 3607 - -Selenium 2.20 -* disable native events for FF on Mac by default -* fix webdriverwait to execute at least once when using 0 timeout -* Fixed Issue 3438 - -Selenium 2.19 -* WebDriverBackedSelenium is now avalaible to all languages -* Addon installation fixes - -Selenium 2.18 -* Proxy capabilities passing - -Selenium 2.17 -* OperaDriver can now be invoked by webdriver.Opera() -* Support has been added for ChomeOptions. This deprecates support passing in DesiredCapabilities -* Proxy class to tell the browser a proxy is in use. Currently only for Firefox - -Selenium 2.16 -* bug fixes - -Selenium 2.15 -* bug fixes - -Selenium 2.14 -* Fix for LD_PRELOAD being polluted by WebDriver -* Added Orientation API -* A fix for Error Handling - -Selenium 2.13 -* Fixed switch_to_window so that it didnt crash Firefox Bug 2633 -* Fixed Screenshot handling to work in all browsers. Bug 2829 -* Force Firefox to the Foreground - -Selenium 2.12 -* Added Select as a support pacakge -* Added Beta window size / position api's -* Bug Fixes - -Selenium 2.11.0 2.11.1 -* no changes just packaging - -Selenum 2.10 -* "Choose which apps" dialog has been disabled -* Bug Fixes - -Selenium 2.9 -* Bug Fixes -* Documentation - -Selenium 2.8 -* Actions updates -* Bug Fixes - -Selenium 2.6 -* Documentation fixes - -Selenium 2.5 -* Fixed x64 IE Support -* Bug Fixes - -Selenium 2.4 -* Bug Fixes -* x64 IE Support -* Added WebDriverWait as a support package - -Selenium 2.3 -* Bug Fixes - -Selenium 2.2 -* Ability to get screenshots from Exceptions if they are given -* Access to Remote StackTrace on error - -Selenium 2.1 -* Bug Fixes - -Selenium 2 -* Removed toggle() and select() - -Selenium 2 RC 3 -* Added Opera to Desired Capabilities -* Removed deprecrated methods -* Deprecated toggle() and select() methods. This will be removed in the next release - -Selenium 2 Beta 4 -* Fix for using existing Firefox Profiles -* Alerts Support in IE -* Fix to dictionary returned from size -* Deprecated value property. Use the get_attribute("value") method -* Deprecated get_page_source method. Use page_source property -* Deprecated get_current_window_handle. Use current_window_handle property -* Deprecated get_window_handles. Use window_handles property -* Ability to install extensions into profiles -* Added Location to the WebElement -* ChromeDriver rewritten to use new built in mechanism -* Added Advanced User Interaction API. Only Available for HTMLUnit at the moment -* Profiles now delete their temp folders when driver.quit() is called - -Selenium 2 Beta 3 -* Accept Untrusted Certificates in Firefox -* Fixed Screenshots -* Added DesiredCapabilities to simplify choosing Drivers -* Fixed Firefox Profile creation -* Added Firefox 4 support -* DocStrings Improvements - -Selenium 2 Beta 2 - -* New bindings landed. Change webdriver namespace to "selenium.webdriver" -* Ability to move to default content -* Implicit Waits -* Change the API to use properties instead of get_x -* Changed the Element Finding to match other languages -* Added ability to execute asynchronous scripts from the driver -* Ability to get rendered element size -* Ability to get CSS Value on a webelement -* Corrected Element finding from the element -* Alert and Prompt handling -* Improved IEDriver -* Basic Authentication support for Selenium 2 -* Ability to have multiple Firefox instances diff -Nru selenium-firefoxdriver-2.53.2/py/README.rst selenium-firefoxdriver-3.8.0/py/README.rst --- selenium-firefoxdriver-2.53.2/py/README.rst 2016-04-19 22:03:40.000000000 +0000 +++ selenium-firefoxdriver-3.8.0/py/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,121 +0,0 @@ -====================== -Selenium Client Driver -====================== - -Introduction -============ - -Python language bindings for Selenium WebDriver. - -The `selenium` package is used automate web browser interaction from Python. - -+-----------+-----------------------------------------------------------------------------------+ -| **Home**: | http://www.seleniumhq.org | -+-----------+-----------------------------------------------------------------------------------+ -| **Docs**: | `selenium package API `_ | -+-----------+-----------------------------------------------------------------------------------+ -| **Dev**: | https://github.com/SeleniumHQ/selenium | -+-----------+-----------------------------------------------------------------------------------+ -| **PyPI**: | https://pypi.python.org/pypi/selenium | -+-----------+-----------------------------------------------------------------------------------+ -| **IRC**: | **#selenium** channel on freenode | -+-----------+-----------------------------------------------------------------------------------+ - -Several browsers/drivers are supported (Firefox, Chrome, Internet Explorer, PhantomJS), as well as the Remote protocol. - -Supported Python Versions -========================= - -* Python 2.6, 2.7 -* Python 3.2+ - -Installing -========== - -If you have `pip `_ on your system, you can simply install or upgrade the Python bindings:: - - pip install -U selenium - -Alternately, you can download the source distribution from `PyPI `_ (e.g. selenium-2.53.2.tar.gz), unarchive it, and run:: - - python setup.py install - -Note: both of the methods described above install `selenium` as a system-wide package That will require administrative/root access to ther machine. You may consider using a `virtualenv `_ to create isolated Python environments instead. - -Example 0: -========== - -* open a new Firefox browser -* load the page at the given URL - -:: - - from selenium import webdriver - - browser = webdriver.Firefox() - browser.get('http://seleniumhq.org/') - -Example 1: -========== - -* open a new Firefox browser -* load the Yahoo homepage -* search for "seleniumhq" -* close the browser - -:: - - from selenium import webdriver - from selenium.webdriver.common.keys import Keys - - browser = webdriver.Firefox() - - browser.get('http://www.yahoo.com') - assert 'Yahoo' in browser.title - - elem = browser.find_element_by_name('p') # Find the search box - elem.send_keys('seleniumhq' + Keys.RETURN) - - browser.quit() - -Example 2: -========== - -Selenium WebDriver is often used as a basis for testing web applications. Here is a simple example uisng Python's standard `unittest `_ library: - -:: - - import unittest - - class GoogleTestCase(unittest.TestCase): - - def setUp(self): - self.browser = webdriver.Firefox() - self.addCleanup(self.browser.quit) - - def testPageTitle(self): - self.browser.get('http://www.google.com') - self.assertIn('Google', self.browser.title) - - if __name__ == '__main__': - unittest.main(verbosity=2) - -Selenium Server (optional) -========================== - -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-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.0.jar - -Run the server from the command line:: - - java -jar selenium-server-standalone-2.53.0.jar - -Then run your Python client scripts. - -Use The Source Luke! -==================== - -View source code online at https://github.com/SeleniumHQ/selenium/tree/master/py/ diff -Nru selenium-firefoxdriver-2.53.2/py/selenium/webdriver/common/service.py selenium-firefoxdriver-3.8.0/py/selenium/webdriver/common/service.py --- selenium-firefoxdriver-2.53.2/py/selenium/webdriver/common/service.py 2016-04-19 21:46:22.000000000 +0000 +++ selenium-firefoxdriver-3.8.0/py/selenium/webdriver/common/service.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -# Licensed to the Software Freedom Conservancy (SFC) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The SFC licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import errno -import os -import platform -import subprocess -from subprocess import PIPE -import time -from selenium.common.exceptions import WebDriverException -from selenium.webdriver.common import utils - -class Service(object): - - def __init__(self, executable, port=0, log_file=PIPE, env=None, start_error_message=""): - self.path = executable - - self.port = port - if self.port == 0: - self.port = utils.free_port() - - self.start_error_message = start_error_message - self.log_file = log_file - self.env = env or os.environ - - @property - def service_url(self): - """ - Gets the url of the Service - """ - return "http://localhost:%d" % self.port - - def command_line_args(self): - raise NotImplemented("This method needs to be implemented in a sub class") - - def start(self): - """ - Starts the Service. - - :Exceptions: - - WebDriverException : Raised either when it can't start the service - or when it can't connect to the service - """ - try: - cmd = [self.path] - cmd.extend(self.command_line_args()) - self.process = subprocess.Popen(cmd, env=self.env, - close_fds=platform.system() != 'Windows', - stdout=self.log_file, stderr=self.log_file) - except TypeError: - raise - except OSError as err: - if err.errno == errno.ENOENT: - raise WebDriverException( - "'%s' executable needs to be in PATH. %s" % ( - os.path.basename(self.path), self.start_error_message) - ) - elif err.errno == errno.EACCES: - raise WebDriverException( - "'%s' executable may have wrong permissions. %s" % ( - os.path.basename(self.path), self.start_error_message) - ) - else: - raise - except Exception as e: - raise WebDriverException( - "The executable %s needs to be available in the path. %s\n%s" % - (os.path.basename(self.path), self.start_error_message, str(e)) - ) - count = 0 - while not self.is_connectable(): - count += 1 - time.sleep(1) - if count == 30: - raise WebDriverException("Can not connect to the Service %s" % self.path) - - def is_connectable(self): - return utils.is_connectable(self.port) - - def send_remote_shutdown_command(self): - try: - from urllib import request as url_request - URLError = url_request.URLError - except ImportError: - import urllib2 as url_request - import urllib2 - URLError = urllib2.URLError - - try: - url_request.urlopen("http://127.0.0.1:%d/shutdown" % self.port) - except URLError: - return - count = 0 - while self.is_connectable(): - if count == 30: - break - count += 1 - time.sleep(1) - - def stop(self): - """ - Stops the service. - """ - if self.log_file != PIPE: - try: - self.log_file.close() - except Exception: - pass - - if self.process is None: - return - - try: - self.send_remote_shutdown_command() - except TypeError: - pass - - try: - if self.process: - for stream in [self.process.stdin, - self.process.stdout, - self.process.stderr]: - try: - stream.close() - except AttributeError: - pass - self.process.terminate() - self.process.kill() - self.process.wait() - self.process = None - except OSError: - # kill may not be available under windows environment - pass - - def __del__(self): - # subprocess.Popen doesn't send signal on __del__; - # we have to try to stop the launched process. - self.stop() Binary files /tmp/tmpmV9ZLV/S9OwlrgLUK/selenium-firefoxdriver-2.53.2/py/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so and /tmp/tmpmV9ZLV/rm4PNIaqfp/selenium-firefoxdriver-3.8.0/py/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so differ diff -Nru selenium-firefoxdriver-2.53.2/py/selenium/webdriver/firefox/options.py selenium-firefoxdriver-3.8.0/py/selenium/webdriver/firefox/options.py --- selenium-firefoxdriver-2.53.2/py/selenium/webdriver/firefox/options.py 2016-04-19 21:46:22.000000000 +0000 +++ selenium-firefoxdriver-3.8.0/py/selenium/webdriver/firefox/options.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -# Licensed to the Software Freedom Conservancy (SFC) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The SFC licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -from selenium.common.exceptions import WebDriverException -from selenium.webdriver.common.desired_capabilities import DesiredCapabilities -from selenium.webdriver.firefox.firefox_profile import FirefoxProfile - - -class Options(object): - - def __init__(self): - self._binary_location = '' - self._profile = None - self._arguments = [] - self._extension_files = [] - self._extensions = [] - self._firefox_options = {} - - @property - def binary_location(self): - """ - Returns the location of the binary otherwise an empty string - """ - return self._binary_location - - @binary_location.setter - def binary_location(self, value): - """ - Allows you to set where the firefox binary lives - - :Args: - - value: path to the firefox binary - """ - self._binary_location = value - - @property - def arguments(self): - """ - Returns a list of arguments needed for the browser - """ - return self._arguments - - def add_argument(self, argument): - """ - Adds an argument to the list - - :Args: - - Sets the arguments - """ - if argument: - self._arguments.append(argument) - else: - raise ValueError("argument can not be null") - - @property - def profile(self): - """ - Returns a FirefoxProfile object if one has been set before else None - - """ - return self._profile - - @profile.setter - def profile(self, value): - if not isinstance(value, FirefoxProfile): - raise WebDriverException("When passing in a value to profile," - " please pass in a FirefoxProfile object.") - self._profile = value - - def to_capabilities(self): - """ - Creates a capabilities with all the options that have been set and - - returns a dictionary with everything - """ - firefox = DesiredCapabilities.FIREFOX.copy() - firefox_options = self._firefox_options - if self.binary_location: - firefox_options["binary"] = self.binary_location - if self._profile: - firefox_options["profile"] = self._profile - firefox_options["args"] = self.arguments - - firefox["requiredCapabilities"] = firefox_options - - return firefox diff -Nru selenium-firefoxdriver-2.53.2/py/selenium/webdriver/firefox/remote_connection.py selenium-firefoxdriver-3.8.0/py/selenium/webdriver/firefox/remote_connection.py --- selenium-firefoxdriver-2.53.2/py/selenium/webdriver/firefox/remote_connection.py 2016-01-07 14:44:14.000000000 +0000 +++ selenium-firefoxdriver-3.8.0/py/selenium/webdriver/firefox/remote_connection.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -# Licensed to the Software Freedom Conservancy (SFC) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The SFC licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -from selenium.webdriver.remote.remote_connection import RemoteConnection - -class FirefoxRemoteConnection(RemoteConnection): - - def __init__(self, remote_server_addr, keep_alive=True): - RemoteConnection.__init__(self, remote_server_addr, keep_alive) - self._commands["SET_CONTEXT"] = ('POST', - '/session/$sessionId/moz/context') Binary files /tmp/tmpmV9ZLV/S9OwlrgLUK/selenium-firefoxdriver-2.53.2/py/selenium/webdriver/firefox/webdriver.xpi and /tmp/tmpmV9ZLV/rm4PNIaqfp/selenium-firefoxdriver-3.8.0/py/selenium/webdriver/firefox/webdriver.xpi differ Binary files /tmp/tmpmV9ZLV/S9OwlrgLUK/selenium-firefoxdriver-2.53.2/py/selenium/webdriver/firefox/x86/x_ignore_nofocus.so and /tmp/tmpmV9ZLV/rm4PNIaqfp/selenium-firefoxdriver-3.8.0/py/selenium/webdriver/firefox/x86/x_ignore_nofocus.so differ diff -Nru selenium-firefoxdriver-2.53.2/README.rst selenium-firefoxdriver-3.8.0/README.rst --- selenium-firefoxdriver-2.53.2/README.rst 1970-01-01 00:00:00.000000000 +0000 +++ selenium-firefoxdriver-3.8.0/README.rst 2017-11-30 11:53:13.000000000 +0000 @@ -0,0 +1,145 @@ +====================== +Selenium Client Driver +====================== + +Introduction +============ + +Python language bindings for Selenium WebDriver. + +The `selenium` package is used to automate web browser interaction from Python. + ++-----------+--------------------------------------------------------------------------------------+ +| **Home**: | http://www.seleniumhq.org | ++-----------+--------------------------------------------------------------------------------------+ +| **Docs**: | `selenium package API `_ | ++-----------+--------------------------------------------------------------------------------------+ +| **Dev**: | https://github.com/SeleniumHQ/Selenium | ++-----------+--------------------------------------------------------------------------------------+ +| **PyPI**: | https://pypi.python.org/pypi/selenium | ++-----------+--------------------------------------------------------------------------------------+ +| **IRC**: | **#selenium** channel on freenode | ++-----------+--------------------------------------------------------------------------------------+ + +Several browsers/drivers are supported (Firefox, Chrome, Internet Explorer, PhantomJS), as well as the Remote protocol. + +Supported Python Versions +========================= + +* Python 2.7, 3.4+ + +Installing +========== + +If you have `pip `_ on your system, you can simply install or upgrade the Python bindings:: + + pip install -U selenium + +Alternately, you can download the source distribution from `PyPI `_ (e.g. selenium-3.8.0.tar.gz), unarchive it, and run:: + + python setup.py install + +Note: You may want to consider using `virtualenv `_ to create isolated Python environments. + +Drivers +======= + +Selenium requires a driver to interface with the chosen browser. Firefox, +for example, requires `geckodriver `_, which needs to be installed before the below examples can be run. Make sure it's in your `PATH`, e. g., place it in `/usr/bin` or `/usr/local/bin`. + +Failure to observe this step will give you an error `selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.` + +Other supported browsers will have their own drivers available. Links to some of the more popular browser drivers follow. + ++--------------+-----------------------------------------------------------------------+ +| **Chrome**: | https://sites.google.com/a/chromium.org/chromedriver/downloads | ++--------------+-----------------------------------------------------------------------+ +| **Edge**: | https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ | ++--------------+-----------------------------------------------------------------------+ +| **Firefox**: | https://github.com/mozilla/geckodriver/releases | ++--------------+-----------------------------------------------------------------------+ +| **Safari**: | https://webkit.org/blog/6900/webdriver-support-in-safari-10/ | ++--------------+-----------------------------------------------------------------------+ + +Example 0: +========== + +* open a new Firefox browser +* load the page at the given URL + +.. code-block:: python + + from selenium import webdriver + + browser = webdriver.Firefox() + browser.get('http://seleniumhq.org/') + +Example 1: +========== + +* open a new Firefox browser +* load the Yahoo homepage +* search for "seleniumhq" +* close the browser + +.. code-block:: python + + from selenium import webdriver + from selenium.webdriver.common.keys import Keys + + browser = webdriver.Firefox() + + browser.get('http://www.yahoo.com') + assert 'Yahoo' in browser.title + + elem = browser.find_element_by_name('p') # Find the search box + elem.send_keys('seleniumhq' + Keys.RETURN) + + browser.quit() + +Example 2: +========== + +Selenium WebDriver is often used as a basis for testing web applications. Here is a simple example uisng Python's standard `unittest `_ library: + +.. code-block:: python + + import unittest + from selenium import webdriver + + class GoogleTestCase(unittest.TestCase): + + def setUp(self): + self.browser = webdriver.Firefox() + self.addCleanup(self.browser.quit) + + def testPageTitle(self): + self.browser.get('http://www.google.com') + self.assertIn('Google', self.browser.title) + + if __name__ == '__main__': + unittest.main(verbosity=2) + +Selenium Server (optional) +========================== + +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-release.storage.googleapis.com/3.8/selenium-server-standalone-3.8.0.jar + +Run the server from the command line:: + + java -jar selenium-server-standalone-3.8.0.jar + +Then run your Python client scripts. + +Use The Source Luke! +==================== + +View source code online: + ++-----------+-------------------------------------------------------+ +| official: | https://github.com/SeleniumHQ/selenium/tree/master/py | ++-----------+-------------------------------------------------------+ Binary files /tmp/tmpmV9ZLV/S9OwlrgLUK/selenium-firefoxdriver-2.53.2/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so and /tmp/tmpmV9ZLV/rm4PNIaqfp/selenium-firefoxdriver-3.8.0/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so differ Binary files /tmp/tmpmV9ZLV/S9OwlrgLUK/selenium-firefoxdriver-2.53.2/selenium/webdriver/firefox/webdriver.xpi and /tmp/tmpmV9ZLV/rm4PNIaqfp/selenium-firefoxdriver-3.8.0/selenium/webdriver/firefox/webdriver.xpi differ Binary files /tmp/tmpmV9ZLV/S9OwlrgLUK/selenium-firefoxdriver-2.53.2/selenium/webdriver/firefox/x86/x_ignore_nofocus.so and /tmp/tmpmV9ZLV/rm4PNIaqfp/selenium-firefoxdriver-3.8.0/selenium/webdriver/firefox/x86/x_ignore_nofocus.so differ