Hello community, here is the log from the commit of package python-selenium for openSUSE:Factory checked in at 2018-09-24 13:13:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-selenium (Old) and /work/SRC/openSUSE:Factory/.python-selenium.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-selenium" Mon Sep 24 13:13:04 2018 rev:10 rq:637034 version:3.14.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-selenium/python-selenium.changes 2018-08-04 21:54:41.169421501 +0200 +++ /work/SRC/openSUSE:Factory/.python-selenium.new/python-selenium.changes 2018-09-24 13:13:05.905723944 +0200 @@ -1,0 +2,18 @@ +Fri Sep 21 07:49:59 UTC 2018 - Tomáš Chvátal <tchva...@suse.com> + +- Update to version 3.14.1: + + Fix ability to set timeout for urllib3 (#6286) + + get_cookie uses w3c endpoint when compliant + + Remove body from GET requests (#6250) + + Fix actions pause for fraction of a second (#6300) + + Fixed input pausing for some actions methods + + Capabilities can be set on Options classes + + WebElement rect method is now forward compatible for OSS + endpoints (#6355) + + Deprecation warnings now have a stacklevel of 2 + + keep_alive can now be set on Webdriver init (#6316) + + isDisplayed atom is now used for all w3c compliant browser, + fixing issue with Safari 12 +- Ship license file + +------------------------------------------------------------------- Old: ---- selenium-3.14.0.tar.gz New: ---- selenium-3.14.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-selenium.spec ++++++ --- /var/tmp/diff_new_pack.w660YC/_old 2018-09-24 13:13:06.865722267 +0200 +++ /var/tmp/diff_new_pack.w660YC/_new 2018-09-24 13:13:06.869722259 +0200 @@ -12,13 +12,13 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-selenium -Version: 3.14.0 +Version: 3.14.1 Release: 0 Summary: Python bindings for Selenium License: Apache-2.0 @@ -66,6 +66,7 @@ %files %{python_files} %doc README.rst CHANGES +%license LICENSE %{python_sitelib}/selenium* %changelog ++++++ selenium-3.14.0.tar.gz -> selenium-3.14.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/CHANGES new/selenium-3.14.1/CHANGES --- old/selenium-3.14.0/CHANGES 2018-08-02 15:06:22.000000000 +0200 +++ new/selenium-3.14.1/CHANGES 2018-09-20 20:21:34.000000000 +0200 @@ -1,10 +1,21 @@ +Selenium 3.14.1 +* Fix ability to set timeout for urllib3 (#6286) +* get_cookie uses w3c endpoint when compliant +* Remove body from GET requests (#6250) +* Fix actions pause for fraction of a second (#6300) +* Fixed input pausing for some actions methods +* Capabilities can be set on Options classes +* WebElement rect method is now forward compatible for OSS endpoints (#6355) +* Deprecation warnings now have a stacklevel of 2 +* keep_alive can now be set on Webdriver init (#6316) +* isDisplayed atom is now used for all w3c compliant browser, fixing issue with Safari 12 + Selenium 3.14.0 * Fix doc of URL-related ExpectedCondition (#6236) * Added ExpectedCondition invisibility_of_element * Swap out httplib for urllib3 * Be consistent with webdriver init kwarg service_log_path (#5725) - Selenium 3.13.0 * Add executing Chrome devtools command (#5989) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/LICENSE new/selenium-3.14.1/LICENSE --- old/selenium-3.14.0/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/selenium-3.14.1/LICENSE 2018-09-20 20:11:36.000000000 +0200 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Software Freedom Conservancy (SFC) + + Licensed 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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/PKG-INFO new/selenium-3.14.1/PKG-INFO --- old/selenium-3.14.0/PKG-INFO 2018-08-02 15:22:42.000000000 +0200 +++ new/selenium-3.14.1/PKG-INFO 2018-09-20 21:20:47.000000000 +0200 @@ -1,11 +1,12 @@ -Metadata-Version: 1.2 +Metadata-Version: 1.1 Name: selenium -Version: 3.14.0 +Version: 3.14.1 Summary: Python bindings for Selenium Home-page: https://github.com/SeleniumHQ/selenium/ -Maintainer: david.burns -Maintainer-email: david.bu...@theautomatedtester.co.uk +Author: UNKNOWN +Author-email: UNKNOWN License: Apache 2.0 +Description-Content-Type: UNKNOWN Description: ====================== Selenium Client Driver ====================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/__init__.py new/selenium-3.14.1/selenium/__init__.py --- old/selenium-3.14.0/selenium/__init__.py 2018-07-26 11:59:38.000000000 +0200 +++ new/selenium-3.14.1/selenium/__init__.py 2018-09-20 20:22:22.000000000 +0200 @@ -16,4 +16,4 @@ # under the License. -__version__ = "3.14.0" +__version__ = "3.14.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/__init__.py new/selenium-3.14.1/selenium/webdriver/__init__.py --- old/selenium-3.14.0/selenium/webdriver/__init__.py 2018-08-02 14:59:35.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/__init__.py 2018-09-20 20:22:22.000000000 +0200 @@ -36,4 +36,4 @@ from .common.touch_actions import TouchActions # noqa from .common.proxy import Proxy # noqa -__version__ = '3.14.0' +__version__ = '3.14.1' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/chrome/options.py new/selenium-3.14.1/selenium/webdriver/chrome/options.py --- old/selenium-3.14.0/selenium/webdriver/chrome/options.py 2018-05-08 15:56:18.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/chrome/options.py 2018-09-18 04:04:30.000000000 +0200 @@ -33,6 +33,7 @@ self._extensions = [] self._experimental_options = {} self._debugger_address = None + self._caps = DesiredCapabilities.CHROME.copy() @property def binary_location(self): @@ -52,6 +53,14 @@ self._binary_location = value @property + def capabilities(self): + return self._caps + + def set_capability(self, name, value): + """Sets a capability.""" + self._caps[name] = value + + @property def debugger_address(self): """ Returns the address of the remote devtools instance @@ -179,7 +188,7 @@ def set_headless(self, headless=True): """ Deprecated, options.headless = True """ warnings.warn('use setter for headless property instead of set_headless', - DeprecationWarning) + DeprecationWarning, stacklevel=2) self.headless = headless def to_capabilities(self): @@ -188,8 +197,7 @@ returns a dictionary with everything """ - caps = DesiredCapabilities.CHROME.copy() - + caps = self._caps chrome_options = self.experimental_options.copy() chrome_options["extensions"] = self.extensions if self.binary_location: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/chrome/webdriver.py new/selenium-3.14.1/selenium/webdriver/chrome/webdriver.py --- old/selenium-3.14.0/selenium/webdriver/chrome/webdriver.py 2018-06-26 14:11:36.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/chrome/webdriver.py 2018-09-18 04:35:23.000000000 +0200 @@ -33,7 +33,7 @@ def __init__(self, executable_path="chromedriver", port=0, options=None, service_args=None, desired_capabilities=None, service_log_path=None, - chrome_options=None): + chrome_options=None, keep_alive=True): """ Creates a new instance of the chrome driver. @@ -42,12 +42,17 @@ :Args: - executable_path - path to the executable. If the default is used it assumes the executable is in the $PATH - port - port you would like the service to run, if left as 0, a free port will be found. - - desired_capabilities: Dictionary object with non-browser specific + - options - this takes an instance of ChromeOptions + - service_args - List of args to pass to the driver service + - desired_capabilities - Dictionary object with non-browser specific capabilities only, such as "proxy" or "loggingPref". - - options: this takes an instance of ChromeOptions + - service_log_path - Where to log information from the driver. + - chrome_options - Deprecated argument for options + - keep_alive - Whether to configure ChromeRemoteConnection to use HTTP keep-alive. """ if chrome_options: - warnings.warn('use options instead of chrome_options', DeprecationWarning) + warnings.warn('use options instead of chrome_options', + DeprecationWarning, stacklevel=2) options = chrome_options if options is None: @@ -71,7 +76,8 @@ RemoteWebDriver.__init__( self, command_executor=ChromeRemoteConnection( - remote_server_addr=self.service.service_url), + remote_server_addr=self.service.service_url, + keep_alive=keep_alive), desired_capabilities=desired_capabilities) except Exception: self.quit() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/common/action_chains.py new/selenium-3.14.1/selenium/webdriver/common/action_chains.py --- old/selenium-3.14.0/selenium/webdriver/common/action_chains.py 2018-07-26 11:59:38.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/common/action_chains.py 2018-09-04 16:27:41.000000000 +0200 @@ -84,12 +84,11 @@ def reset_actions(self): """ - Clears actions that are already stored on the remote end. + Clears actions that are already stored locally and on the remote end """ if self._driver.w3c: - self._driver.execute(Command.W3C_CLEAR_ACTIONS) - else: - self._actions = [] + self.w3c_actions.clear_actions() + self._actions = [] def click(self, on_element=None): """ @@ -99,13 +98,13 @@ - on_element: The element to click. If None, clicks on current mouse position. """ + if on_element: + self.move_to_element(on_element) if self._driver.w3c: - self.w3c_actions.pointer_action.click(on_element) + self.w3c_actions.pointer_action.click() self.w3c_actions.key_action.pause() self.w3c_actions.key_action.pause() else: - if on_element: - self.move_to_element(on_element) self._actions.append(lambda: self._driver.execute( Command.CLICK, {'button': 0})) return self @@ -118,14 +117,12 @@ - on_element: The element to mouse down. If None, clicks on current mouse position. """ + if on_element: + self.move_to_element(on_element) if self._driver.w3c: - self.w3c_actions.pointer_action.click_and_hold(on_element) + self.w3c_actions.pointer_action.click_and_hold() self.w3c_actions.key_action.pause() - if on_element: - self.w3c_actions.key_action.pause() else: - if on_element: - self.move_to_element(on_element) self._actions.append(lambda: self._driver.execute( Command.MOUSE_DOWN, {})) return self @@ -138,12 +135,13 @@ - on_element: The element to context-click. If None, clicks on current mouse position. """ + if on_element: + self.move_to_element(on_element) if self._driver.w3c: - self.w3c_actions.pointer_action.context_click(on_element) + self.w3c_actions.pointer_action.context_click() + self.w3c_actions.key_action.pause() self.w3c_actions.key_action.pause() else: - if on_element: - self.move_to_element(on_element) self._actions.append(lambda: self._driver.execute( Command.CLICK, {'button': 2})) return self @@ -156,13 +154,13 @@ - on_element: The element to double-click. If None, clicks on current mouse position. """ + if on_element: + self.move_to_element(on_element) if self._driver.w3c: - self.w3c_actions.pointer_action.double_click(on_element) + self.w3c_actions.pointer_action.double_click() for _ in range(4): self.w3c_actions.key_action.pause() else: - if on_element: - self.move_to_element(on_element) self._actions.append(lambda: self._driver.execute( Command.DOUBLE_CLICK, {})) return self @@ -176,15 +174,8 @@ - source: The element to mouse down. - target: The element to mouse up. """ - if self._driver.w3c: - self.w3c_actions.pointer_action.click_and_hold(source) \ - .move_to(target) \ - .release() - for _ in range(3): - self.w3c_actions.key_action.pause() - else: - self.click_and_hold(source) - self.release(target) + self.click_and_hold(source) + self.release(target) return self def drag_and_drop_by_offset(self, source, xoffset, yoffset): @@ -197,16 +188,9 @@ - xoffset: X offset to move to. - yoffset: Y offset to move to. """ - if self._driver.w3c: - self.w3c_actions.pointer_action.click_and_hold(source) \ - .move_by(xoffset, yoffset) \ - .release() - for _ in range(3): - self.w3c_actions.key_action.pause() - else: - self.click_and_hold(source) - self.move_by_offset(xoffset, yoffset) - self.release() + self.click_and_hold(source) + self.move_by_offset(xoffset, yoffset) + self.release() return self def key_down(self, value, element=None): @@ -332,7 +316,7 @@ If None, releases on current mouse position. """ if on_element: - self.move_to_element(on_element) + self.move_to_element(on_element) if self._driver.w3c: self.w3c_actions.pointer_action.release() self.w3c_actions.key_action.pause() @@ -348,11 +332,14 @@ - keys_to_send: The keys to send. Modifier keys constants can be found in the 'Keys' class. """ + typing = keys_to_typing(keys_to_send) if self._driver.w3c: - self.w3c_actions.key_action.send_keys(keys_to_send) + for key in typing: + self.key_down(key) + self.key_up(key) else: self._actions.append(lambda: self._driver.execute( - Command.SEND_KEYS_TO_ACTIVE_ELEMENT, {'value': keys_to_typing(keys_to_send)})) + Command.SEND_KEYS_TO_ACTIVE_ELEMENT, {'value': typing})) return self def send_keys_to_element(self, element, *keys_to_send): @@ -364,10 +351,8 @@ - keys_to_send: The keys to send. Modifier keys constants can be found in the 'Keys' class. """ - if self._driver.w3c: - self.w3c_actions.key_action.send_keys(keys_to_send, element=element) - else: - self._actions.append(lambda: element.send_keys(*keys_to_send)) + self.click(element) + self.send_keys(*keys_to_send) return self # Context manager so ActionChains can be used in a 'with .. as' statements. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/common/actions/action_builder.py new/selenium-3.14.1/selenium/webdriver/common/actions/action_builder.py --- old/selenium-3.14.0/selenium/webdriver/common/actions/action_builder.py 2018-06-26 14:11:36.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/common/actions/action_builder.py 2018-09-04 16:27:41.000000000 +0200 @@ -76,6 +76,9 @@ self.driver.execute(Command.W3C_ACTIONS, enc) def clear_actions(self): + """ + Clears actions that are already stored on the remote end + """ self.driver.execute(Command.W3C_CLEAR_ACTIONS) def _add_input(self, input): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/common/actions/interaction.py new/selenium-3.14.1/selenium/webdriver/common/actions/interaction.py --- old/selenium-3.14.0/selenium/webdriver/common/actions/interaction.py 2018-06-26 14:11:36.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/common/actions/interaction.py 2018-09-04 16:27:41.000000000 +0200 @@ -44,6 +44,7 @@ self.duration = duration def encode(self): - output = {"type": self.PAUSE} - output["duration"] = self.duration * 1000 - return output + return { + "type": self.PAUSE, + "duration": int(self.duration * 1000) + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/common/actions/key_actions.py new/selenium-3.14.1/selenium/webdriver/common/actions/key_actions.py --- old/selenium-3.14.0/selenium/webdriver/common/actions/key_actions.py 2017-03-06 14:53:23.000000000 +0100 +++ new/selenium-3.14.1/selenium/webdriver/common/actions/key_actions.py 2018-09-04 16:27:41.000000000 +0200 @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -from .interaction import Interaction +from .interaction import Interaction, KEY from .key_input import KeyInput from ..utils import keys_to_typing @@ -23,30 +23,28 @@ def __init__(self, source=None): if source is None: - source = KeyInput() + source = KeyInput(KEY) self.source = source super(KeyActions, self).__init__(source) - def key_down(self, letter, element=None): - return self._key_action("create_key_down", - letter, element) - - def key_up(self, letter, element=None): - return self._key_action("create_key_up", - letter, element) + def key_down(self, letter): + return self._key_action("create_key_down", letter) + + def key_up(self, letter): + return self._key_action("create_key_up", letter) def pause(self, duration=0): return self._key_action("create_pause", duration) - def send_keys(self, text, element=None): + def send_keys(self, text): if not isinstance(text, list): text = keys_to_typing(text) for letter in text: - self.key_down(letter, element) - self.key_up(letter, element) + self.key_down(letter) + self.key_up(letter) return self - def _key_action(self, action, letter, element=None): + def _key_action(self, action, letter): meth = getattr(self.source, action) meth(letter) return self diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/common/actions/pointer_input.py new/selenium-3.14.1/selenium/webdriver/common/actions/pointer_input.py --- old/selenium-3.14.0/selenium/webdriver/common/actions/pointer_input.py 2018-06-26 14:11:36.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/common/actions/pointer_input.py 2018-09-04 16:27:41.000000000 +0200 @@ -54,7 +54,7 @@ self.add_action({"type": "pointerCancel"}) def create_pause(self, pause_duration): - self.add_action({"type": "pause", "duration": pause_duration * 1000}) + self.add_action({"type": "pause", "duration": int(pause_duration * 1000)}) def encode(self): return {"type": self.type, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/edge/options.py new/selenium-3.14.1/selenium/webdriver/edge/options.py --- old/selenium-3.14.0/selenium/webdriver/edge/options.py 2016-01-07 15:44:14.000000000 +0100 +++ new/selenium-3.14.1/selenium/webdriver/edge/options.py 2018-09-04 16:27:41.000000000 +0200 @@ -22,6 +22,7 @@ def __init__(self): self._page_load_strategy = "normal" + self._caps = DesiredCapabilities.EDGE.copy() @property def page_load_strategy(self): @@ -33,13 +34,21 @@ raise ValueError("Page Load Strategy should be 'normal', 'eager' or 'none'.") self._page_load_strategy = value + @property + def capabilities(self): + return self._caps + + def set_capability(self, name, value): + """Sets a capability.""" + self._caps[name] = value + def to_capabilities(self): """ Creates a capabilities with all the options that have been set and returns a dictionary with everything """ - edge = DesiredCapabilities.EDGE.copy() - edge['pageLoadStrategy'] = self._page_load_strategy + caps = self._caps + caps['pageLoadStrategy'] = self._page_load_strategy - return edge + return caps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/edge/webdriver.py new/selenium-3.14.1/selenium/webdriver/edge/webdriver.py --- old/selenium-3.14.0/selenium/webdriver/edge/webdriver.py 2018-07-26 11:59:38.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/edge/webdriver.py 2018-09-18 04:35:23.000000000 +0200 @@ -26,9 +26,26 @@ class WebDriver(RemoteWebDriver): def __init__(self, executable_path='MicrosoftWebDriver.exe', - capabilities=None, port=0, verbose=False, service_log_path=None, log_path=None): + capabilities=None, port=0, verbose=False, service_log_path=None, + log_path=None, keep_alive=False): + """ + Creates a new instance of the chrome driver. + + Starts the service and then creates new instance of chrome driver. + + :Args: + - executable_path - path to the executable. If the default is used it assumes the executable is in the $PATH + - capabilities - Dictionary object with non-browser specific + capabilities only, such as "proxy" or "loggingPref". + - port - port you would like the service to run, if left as 0, a free port will be found. + - verbose - whether to set verbose logging in the service + - service_log_path - Where to log information from the driver. + - log_path: Deprecated argument for service_log_path + - keep_alive - Whether to configure ChromeRemoteConnection to use HTTP keep-alive. + """ if log_path: - warnings.warn('use service_log_path instead of log_path', DeprecationWarning) + warnings.warn('use service_log_path instead of log_path', + DeprecationWarning, stacklevel=2) service_log_path = log_path self.port = port @@ -44,7 +61,8 @@ RemoteWebDriver.__init__( self, command_executor=RemoteConnection('http://localhost:%d' % self.port, - resolve_ip=False), + resolve_ip=False, + keep_alive=keep_alive), desired_capabilities=capabilities) self._is_remote = False Binary files old/selenium-3.14.0/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so and new/selenium-3.14.1/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/firefox/firefox_profile.py new/selenium-3.14.1/selenium/webdriver/firefox/firefox_profile.py --- old/selenium-3.14.0/selenium/webdriver/firefox/firefox_profile.py 2018-03-05 10:36:38.000000000 +0100 +++ new/selenium-3.14.1/selenium/webdriver/firefox/firefox_profile.py 2018-09-18 04:04:30.000000000 +0200 @@ -184,7 +184,7 @@ warnings.warn( "This method has been deprecated. Please pass in the proxy object to the Driver Object", - DeprecationWarning) + DeprecationWarning, stacklevel=2) if proxy is None: raise ValueError("proxy can not be None") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/firefox/options.py new/selenium-3.14.1/selenium/webdriver/firefox/options.py --- old/selenium-3.14.0/selenium/webdriver/firefox/options.py 2018-05-08 15:56:18.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/firefox/options.py 2018-09-18 04:04:30.000000000 +0200 @@ -41,6 +41,7 @@ self._preferences = {} self._profile = None self._proxy = None + self._caps = DesiredCapabilities.FIREFOX.copy() self._arguments = [] self.log = Log() @@ -70,6 +71,22 @@ self.binary = value @property + def accept_insecure_certs(self): + return self._caps.get('acceptInsecureCerts') + + @accept_insecure_certs.setter + def accept_insecure_certs(self, value): + self._caps['acceptInsecureCerts'] = value + + @property + def capabilities(self): + return self._caps + + def set_capability(self, name, value): + """Sets a capability.""" + self._caps[name] = value + + @property def preferences(self): """Returns a dict of preferences.""" return self._preferences @@ -138,7 +155,7 @@ def set_headless(self, headless=True): """ Deprecated, options.headless = True """ warnings.warn('use setter for headless property instead of set_headless', - DeprecationWarning) + DeprecationWarning, stacklevel=2) self.headless = headless def to_capabilities(self): @@ -150,7 +167,7 @@ # so if a binary or profile has _not_ been set, # it will defer to geckodriver to find the system Firefox # and generate a fresh profile. - caps = DesiredCapabilities.FIREFOX.copy() + caps = self._caps opts = {} if self._binary is not None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/firefox/webdriver.py new/selenium-3.14.1/selenium/webdriver/firefox/webdriver.py --- old/selenium-3.14.0/selenium/webdriver/firefox/webdriver.py 2018-08-02 14:55:40.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/firefox/webdriver.py 2018-09-18 04:35:23.000000000 +0200 @@ -51,7 +51,8 @@ timeout=30, capabilities=None, proxy=None, executable_path="geckodriver", options=None, service_log_path="geckodriver.log", firefox_options=None, - service_args=None, desired_capabilities=None, log_path=None): + service_args=None, desired_capabilities=None, log_path=None, + keep_alive=True): """Starts a new local session of Firefox. Based on the combination and specificity of the various keyword @@ -95,16 +96,22 @@ defaults to picking up the binary from the system path. :param options: Instance of ``options.Options``. :param service_log_path: Where to log information from the driver. + :param firefox_options: Deprecated argument for options + :param service_args: List of args to pass to the driver service :param desired_capabilities: alias of capabilities. In future versions of this library, this will replace 'capabilities'. This will make the signature consistent with RemoteWebDriver. - + :param log_path: Deprecated argument for service_log_path + :param keep_alive: Whether to configure remote_connection.RemoteConnection to use + HTTP keep-alive. """ if log_path: - warnings.warn('use service_log_path instead of log_path', DeprecationWarning) + warnings.warn('use service_log_path instead of log_path', + DeprecationWarning, stacklevel=2) service_log_path = log_path if firefox_options: - warnings.warn('use options instead of firefox_options', DeprecationWarning) + warnings.warn('use options instead of firefox_options', + DeprecationWarning, stacklevel=2) options = firefox_options self.binary = None self.profile = None @@ -186,7 +193,7 @@ self, command_executor=executor, desired_capabilities=capabilities, - keep_alive=True) + keep_alive=keep_alive) self._is_remote = False Binary files old/selenium-3.14.0/selenium/webdriver/firefox/webdriver.xpi and new/selenium-3.14.1/selenium/webdriver/firefox/webdriver.xpi differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/firefox/webdriver_prefs.json new/selenium-3.14.1/selenium/webdriver/firefox/webdriver_prefs.json --- old/selenium-3.14.0/selenium/webdriver/firefox/webdriver_prefs.json 2018-08-02 15:10:33.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/firefox/webdriver_prefs.json 2018-09-20 20:11:36.000000000 +0200 @@ -29,7 +29,6 @@ "extensions.autoDisableScopes": 10, "extensions.blocklist.enabled": false, "extensions.checkCompatibility.nightly": false, - "extensions.logging.enabled": true, "extensions.update.enabled": false, "extensions.update.notifyUser": false, "javascript.enabled": true, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/ie/options.py new/selenium-3.14.1/selenium/webdriver/ie/options.py --- old/selenium-3.14.0/selenium/webdriver/ie/options.py 2018-05-08 15:56:18.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/ie/options.py 2018-09-04 16:27:41.000000000 +0200 @@ -47,6 +47,7 @@ self._arguments = [] self._options = {} self._additional = {} + self._caps = DesiredCapabilities.INTERNETEXPLORER.copy() @property def arguments(self): @@ -65,6 +66,14 @@ return self._options @property + def capabilities(self): + return self._caps + + def set_capability(self, name, value): + """Sets a capability.""" + self._caps[name] = value + + @property def browser_attach_timeout(self): """ Returns the options Browser Attach Timeout in milliseconds """ return self._options.get(self.BROWSER_ATTACH_TIMEOUT) @@ -328,7 +337,7 @@ def to_capabilities(self): """ Marshals the IE options to a the correct object """ - caps = DesiredCapabilities.INTERNETEXPLORER.copy() + caps = self._caps opts = self._options.copy() if len(self._arguments) > 0: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/ie/webdriver.py new/selenium-3.14.1/selenium/webdriver/ie/webdriver.py --- old/selenium-3.14.0/selenium/webdriver/ie/webdriver.py 2018-07-26 11:59:38.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/ie/webdriver.py 2018-09-18 04:35:23.000000000 +0200 @@ -34,7 +34,7 @@ def __init__(self, executable_path='IEDriverServer.exe', capabilities=None, port=DEFAULT_PORT, timeout=DEFAULT_TIMEOUT, host=DEFAULT_HOST, log_level=DEFAULT_LOG_LEVEL, service_log_path=DEFAULT_SERVICE_LOG_PATH, options=None, - ie_options=None, desired_capabilities=None, log_file=None): + ie_options=None, desired_capabilities=None, log_file=None, keep_alive=False): """ Creates a new instance of the chrome driver. @@ -44,16 +44,23 @@ - executable_path - path to the executable. If the default is used it assumes the executable is in the $PATH - capabilities: capabilities Dictionary object - port - port you would like the service to run, if left as 0, a free port will be found. + - timeout - no longer used, kept for backward compatibility + - host - IP address for the service - log_level - log level you would like the service to run. - service_log_path - target of logging of service, may be "stdout", "stderr" or file path. - - options: IE Options instance, providing additional IE options - - desired_capabilities: alias of capabilities; this will make the signature consistent with RemoteWebDriver. + - options - IE Options instance, providing additional IE options + - ie_options - Deprecated argument for options + - desired_capabilities - alias of capabilities; this will make the signature consistent with RemoteWebDriver. + - log_file - Deprecated argument for service_log_path + - keep_alive - Whether to configure RemoteConnection to use HTTP keep-alive. """ if log_file: - warnings.warn('use service_log_path instead of log_file', DeprecationWarning) + warnings.warn('use service_log_path instead of log_file', + DeprecationWarning, stacklevel=2) service_log_path = log_file if ie_options: - warnings.warn('use options instead of ie_options', DeprecationWarning) + warnings.warn('use options instead of ie_options', + DeprecationWarning, stacklevel=2) options = ie_options self.port = port if self.port == 0: @@ -86,7 +93,8 @@ RemoteWebDriver.__init__( self, command_executor='http://localhost:%d' % self.port, - desired_capabilities=capabilities) + desired_capabilities=capabilities, + keep_alive=keep_alive) self._is_remote = False def quit(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/opera/options.py new/selenium-3.14.1/selenium/webdriver/opera/options.py --- old/selenium-3.14.0/selenium/webdriver/opera/options.py 2018-03-05 10:36:38.000000000 +0100 +++ new/selenium-3.14.1/selenium/webdriver/opera/options.py 2018-09-04 16:27:41.000000000 +0200 @@ -27,6 +27,15 @@ self._android_package_name = '' self._android_device_socket = '' self._android_command_line_file = '' + self._caps = DesiredCapabilities.OPERA.copy() + + @property + def capabilities(self): + return self._caps + + def set_capability(self, name, value): + """Sets a capability.""" + self._caps[name] = value @property def android_package_name(self): @@ -86,7 +95,7 @@ returns a dictionary with everything """ capabilities = ChromeOptions.to_capabilities(self) - capabilities.update(DesiredCapabilities.OPERA) + capabilities.update(self._caps) opera_options = capabilities[self.KEY] if self.android_package_name: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/opera/webdriver.py new/selenium-3.14.1/selenium/webdriver/opera/webdriver.py --- old/selenium-3.14.0/selenium/webdriver/opera/webdriver.py 2017-11-21 21:41:08.000000000 +0100 +++ new/selenium-3.14.1/selenium/webdriver/opera/webdriver.py 2018-09-18 04:35:23.000000000 +0200 @@ -27,7 +27,7 @@ def __init__(self, executable_path=None, port=0, options=None, service_args=None, desired_capabilities=None, service_log_path=None, - opera_options=None): + opera_options=None, keep_alive=True): """ Creates a new instance of the operadriver. @@ -38,12 +38,16 @@ it assumes the executable is in the $PATH - port - port you would like the service to run, if left as 0, a free port will be found. + - options: this takes an instance of OperaOptions + - service_args - List of args to pass to the driver service - desired_capabilities: Dictionary object with non-browser specific + - service_log_path - Where to log information from the driver. + - opera_options - Deprecated argument for options capabilities only, such as "proxy" or "loggingPref". - - options: this takes an instance of ChromeOptions """ if opera_options: - warnings.warn('use options instead of opera_options', DeprecationWarning) + warnings.warn('use options instead of opera_options', + DeprecationWarning, stacklevel=2) options = opera_options executable_path = (executable_path if executable_path is not None @@ -54,7 +58,8 @@ options=options, service_args=service_args, desired_capabilities=desired_capabilities, - service_log_path=service_log_path) + service_log_path=service_log_path, + keep_alive=keep_alive) def create_options(self): return Options() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/remote/getAttribute.js new/selenium-3.14.1/selenium/webdriver/remote/getAttribute.js --- old/selenium-3.14.0/selenium/webdriver/remote/getAttribute.js 2018-08-02 15:10:12.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/remote/getAttribute.js 2018-09-20 20:11:35.000000000 +0200 @@ -3,6 +3,6 @@ l[52]="invalid selector";l[17]="javascript error";l[405]="unsupported operation";l[34]="move target out of bounds";l[27]="no such alert";l[7]="no such element";l[8]="no such frame";l[23]="no such window";l[28]="script timeout";l[33]="session not created";l[10]="stale element reference";l[21]="timeout";l[25]="unable to set cookie";l[26]="unexpected alert open";l[13]=m;l[9]="unknown command";h.prototype.toString=function(){return this.name+": "+this.message};var n;a:{var p=d.navigator;if(p){var q=p.userAgent;if(q){n=q;break a}}n=""}function r(a){return-1!=n.indexOf(a)};function t(a,b){for(var e=a.length,c=f(a)?a.split(""):a,g=0;g<e;g++)g in c&&b.call(void 0,c[g],g,a)};function v(){return r("iPhone")&&!r("iPod")&&!r("iPad")};function w(){return(r("Chrome")||r("CriOS"))&&!r("Edge")};var x=r("Opera"),y=r("Trident")||r("MSIE"),z=r("Edge"),A=r("Gecko")&&!(-1!=n.toLowerCase().indexOf("webkit")&&!r("Edge"))&&!(r("Trident")||r("MSIE"))&&!r("Edge"),aa=-1!=n.toLowerCase().indexOf("webkit")&&!r("Edge");function B(){var a=d.document;return a?a.documentMode:void 0}var C; a:{var D="",E=function(){var a=n;if(A)return/rv\:([^\);]+)(\)|;)/.exec(a);if(z)return/Edge\/([\d\.]+)/.exec(a);if(y)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(aa)return/WebKit\/(\S+)/.exec(a);if(x)return/(?:Version)[ \/]?(\S+)/.exec(a)}();E&&(D=E?E[1]:"");if(y){var F=B();if(null!=F&&F>parseFloat(D)){C=String(F);break a}}C=D}var G;var H=d.document;G=H&&y?B()||("CSS1Compat"==H.compatMode?parseInt(C,10):5):void 0;var ba=r("Firefox"),ca=v()||r("iPod"),da=r("iPad"),I=r("Android")&&!(w()||r("Firefox")||r("Opera")||r("Silk")),ea=w(),J=r("Safari")&&!(w()||r("Coast")||r("Opera")||r("Edge")||r("Silk")||r("Android"))&&!(v()||r("iPad")||r("iPod"));function K(a){return(a=a.exec(n))?a[1]:""}(function(){if(ba)return K(/Firefox\/([0-9.]+)/);if(y||z||x)return C;if(ea)return v()||r("iPad")||r("iPod")?K(/CriOS\/([0-9.]+)/):K(/Chrome\/([0-9.]+)/);if(J&&!(v()||r("iPad")||r("iPod")))return K(/Version\/([0-9.]+)/);if(ca||da){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(n);if(a)return a[1]+"."+a[2]}else if(I)return(a=K(/Android\s+([0-9.]+)/))?a:K(/Version\/([0-9.]+)/);return""})();var L,M=function(){if(!A)return!1;var a=d.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(g){return!1}var b=a.classes,a=a.interfaces,e=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).version;L=function(a){e.compare(c,""+a)};return!0}(),N=y&&!(8<=Number(G)),fa=y&&!(9<=Number(G));I&&M&&L(2.3);I&&M&&L(4);J&&M&&L(6);var ga={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},O={IMG:" ",BR:"\n"};function P(a,b,e){if(!(a.nodeName in ga))if(3==a.nodeType)e?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in O)b.push(O[a.nodeName]);else for(a=a.firstChild;a;)P(a,b,e),a=a.nextSibling};function Q(a,b){b=b.toLowerCase();return"style"==b?ha(a.style.cssText):N&&"value"==b&&R(a,"INPUT")?a.value:fa&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var ia=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/; function ha(a){var b=[];t(a.split(ia),function(a){var c=a.indexOf(":");0<c&&(a=[a.slice(0,c),a.slice(c+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");return b=";"==b.charAt(b.length-1)?b:b+";"}function S(a,b){N&&"value"==b&&R(a,"OPTION")&&null===Q(a,"value")?(b=[],P(a,b,!1),a=b.join("")):a=a[b];return a}function R(a,b){b&&"string"!==typeof b&&(b=b.toString());return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)} -function T(a){return R(a,"OPTION")?!0:R(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1};var ja={"class":"className",readonly:"readOnly"},U="async autofocus autoplay checked compact complete controls declare defaultchecked defaultselected defer disabled draggable ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref noresize noshade novalidate nowrap open paused pubdate readonly required reversed scoped seamless seeking selected spellcheck truespeed willvalidate".split(" ");function V(a,b){var e=null,c=b.toLowerCase();if("style"==c)return(e=a.style)&&!f(e)&&(e=e.cssText),e;if(("selected"==c||"checked"==c)&&T(a)){if(!T(a))throw new h(15,"Element is not selectable");b="selected";e=a.type&&a.type.toLowerCase();if("checkbox"==e||"radio"==e)b="checked";return S(a,b)?"true":null}var g=R(a,"A");if(R(a,"IMG")&&"src"==c||g&&"href"==c)return(e=Q(a,c))&&(e=S(a,c)),e;if("spellcheck"==c){e=Q(a,c);if(null!==e){if("false"==e.toLowerCase())return"false";if("true"==e.toLowerCase())return"true"}return S(a, +function T(a){return R(a,"OPTION")?!0:R(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1};var ja={"class":"className",readonly:"readOnly"},U="allowfullscreen allowpaymentrequest allowusermedia async autofocus autoplay checked compact complete controls declare default defaultchecked defaultselected defer disabled ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref nomodule noresize noshade novalidate nowrap open paused playsinline pubdate readonly required reversed scoped seamless seeking selected truespeed typemustmatch willvalidate".split(" ");function V(a,b){var e=null,c=b.toLowerCase();if("style"==c)return(e=a.style)&&!f(e)&&(e=e.cssText),e;if(("selected"==c||"checked"==c)&&T(a)){if(!T(a))throw new h(15,"Element is not selectable");b="selected";e=a.type&&a.type.toLowerCase();if("checkbox"==e||"radio"==e)b="checked";return S(a,b)?"true":null}var g=R(a,"A");if(R(a,"IMG")&&"src"==c||g&&"href"==c)return(e=Q(a,c))&&(e=S(a,c)),e;if("spellcheck"==c){e=Q(a,c);if(null!==e){if("false"==e.toLowerCase())return"false";if("true"==e.toLowerCase())return"true"}return S(a, c)+""}g=ja[b]||b;a:if(f(U))c=f(c)&&1==c.length?U.indexOf(c,0):-1;else{for(var u=0;u<U.length;u++)if(u in U&&U[u]===c){c=u;break a}c=-1}if(0<=c)return(e=null!==Q(a,b)||S(a,g))?"true":null;try{var k=S(a,g)}catch(ka){}(c=null==k)||(c=typeof k,c="object"==c&&null!=k||"function"==c);c?e=Q(a,b):e=k;return null!=e?e.toString():null}var W=["_"],X=d;W[0]in X||!X.execScript||X.execScript("var "+W[0]); for(var Y;W.length&&(Y=W.shift());){var Z;if(Z=!W.length)Z=void 0!==V;Z?X[Y]=V:X[Y]&&X[Y]!==Object.prototype[Y]?X=X[Y]:X=X[Y]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null,document:typeof window!='undefined'?window.document:null}, arguments);} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/remote/remote_connection.py new/selenium-3.14.1/selenium/webdriver/remote/remote_connection.py --- old/selenium-3.14.0/selenium/webdriver/remote/remote_connection.py 2018-08-02 14:55:40.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/remote/remote_connection.py 2018-09-04 16:27:41.000000000 +0200 @@ -137,7 +137,7 @@ self._url = remote_server_addr if keep_alive: - self._conn = urllib3.PoolManager() + self._conn = urllib3.PoolManager(timeout=self._timeout) self._commands = { Command.STATUS: ('GET', '/status'), @@ -212,6 +212,7 @@ ('GET', '/session/$sessionId/element/$id/equals/$other'), Command.GET_ALL_COOKIES: ('GET', '/session/$sessionId/cookie'), Command.ADD_COOKIE: ('POST', '/session/$sessionId/cookie'), + Command.GET_COOKIE: ('GET', '/session/$sessionId/cookie/$name'), Command.DELETE_ALL_COOKIES: ('DELETE', '/session/$sessionId/cookie'), Command.DELETE_COOKIE: @@ -391,14 +392,15 @@ parsed_url = parse.urlparse(url) headers = self.get_remote_connection_headers(parsed_url, self.keep_alive) resp = None + if body and method != 'POST' and method != 'PUT': + body = None + if self.keep_alive: - if body and method != 'POST' and method != 'PUT': - body = None resp = self._conn.request(method, url, body=body, headers=headers) statuscode = resp.status else: - http = urllib3.PoolManager() + http = urllib3.PoolManager(timeout=self._timeout) resp = http.request(method, url, body=body, headers=headers) statuscode = resp.status diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/remote/webdriver.py new/selenium-3.14.1/selenium/webdriver/remote/webdriver.py --- old/selenium-3.14.0/selenium/webdriver/remote/webdriver.py 2018-06-26 14:11:36.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/remote/webdriver.py 2018-09-18 04:04:30.000000000 +0200 @@ -30,7 +30,8 @@ from .mobile import Mobile from .file_detector import FileDetector, LocalFileDetector from selenium.common.exceptions import (InvalidArgumentException, - WebDriverException) + WebDriverException, + NoSuchCookieException) from selenium.webdriver.common.by import By from selenium.webdriver.common.html5.application_cache import ApplicationCache @@ -140,7 +141,7 @@ capabilities.update(desired_capabilities) if proxy is not None: warnings.warn("Please use FirefoxOptions to set proxy", - DeprecationWarning) + DeprecationWarning, stacklevel=2) proxy.add_to_capabilities(capabilities) self.command_executor = command_executor if type(self.command_executor) is bytes or isinstance(self.command_executor, str): @@ -152,7 +153,7 @@ self.start_client() if browser_profile is not None: warnings.warn("Please use FirefoxOptions to set browser profile", - DeprecationWarning) + DeprecationWarning, stacklevel=2) self.start_session(capabilities, browser_profile) self._switch_to = SwitchTo(self) self._mobile = Mobile(self) @@ -769,31 +770,36 @@ def switch_to_active_element(self): """ Deprecated use driver.switch_to.active_element """ - warnings.warn("use driver.switch_to.active_element instead", DeprecationWarning) + warnings.warn("use driver.switch_to.active_element instead", + DeprecationWarning, stacklevel=2) return self._switch_to.active_element def switch_to_window(self, window_name): """ Deprecated use driver.switch_to.window """ - warnings.warn("use driver.switch_to.window instead", DeprecationWarning) + warnings.warn("use driver.switch_to.window instead", + DeprecationWarning, stacklevel=2) self._switch_to.window(window_name) def switch_to_frame(self, frame_reference): """ Deprecated use driver.switch_to.frame """ - warnings.warn("use driver.switch_to.frame instead", DeprecationWarning) + warnings.warn("use driver.switch_to.frame instead", + DeprecationWarning, stacklevel=2) self._switch_to.frame(frame_reference) def switch_to_default_content(self): """ Deprecated use driver.switch_to.default_content """ - warnings.warn("use driver.switch_to.default_content instead", DeprecationWarning) + warnings.warn("use driver.switch_to.default_content instead", + DeprecationWarning, stacklevel=2) self._switch_to.default_content() def switch_to_alert(self): """ Deprecated use driver.switch_to.alert """ - warnings.warn("use driver.switch_to.alert instead", DeprecationWarning) + warnings.warn("use driver.switch_to.alert instead", + DeprecationWarning, stacklevel=2) return self._switch_to.alert # Navigation @@ -841,11 +847,17 @@ :Usage: driver.get_cookie('my_cookie') """ - cookies = self.get_cookies() - for cookie in cookies: - if cookie['name'] == name: - return cookie - return None + if self.w3c: + try: + return self.execute(Command.GET_COOKIE, {'name': name})['value'] + except NoSuchCookieException: + return None + else: + cookies = self.get_cookies() + for cookie in cookies: + if cookie['name'] == name: + return cookie + return None def delete_cookie(self, name): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/remote/webelement.py new/selenium-3.14.1/selenium/webdriver/remote/webelement.py --- old/selenium-3.14.0/selenium/webdriver/remote/webelement.py 2018-06-26 14:11:36.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/remote/webelement.py 2018-09-19 21:01:56.000000000 +0200 @@ -482,7 +482,7 @@ def is_displayed(self): """Whether the element is visible to a user.""" # Only go into this conditional for browsers that don't use the atom themselves - if self._w3c and self.parent.capabilities['browserName'] == 'safari': + if self._w3c: return self.parent.execute_script( "return (%s).apply(null, arguments);" % isDisplayed_js, self) @@ -539,7 +539,12 @@ @property def rect(self): """A dictionary with the size and location of the element.""" - return self._execute(Command.GET_ELEMENT_RECT)['value'] + if self._w3c: + return self._execute(Command.GET_ELEMENT_RECT)['value'] + else: + rect = self.size.copy() + rect.update(self.location) + return rect @property def screenshot_as_base64(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/safari/webdriver.py new/selenium-3.14.1/selenium/webdriver/safari/webdriver.py --- old/selenium-3.14.0/selenium/webdriver/safari/webdriver.py 2018-04-04 10:58:50.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/safari/webdriver.py 2018-09-18 04:35:23.000000000 +0200 @@ -34,17 +34,20 @@ """ def __init__(self, port=0, executable_path="/usr/bin/safaridriver", reuse_service=False, - desired_capabilities=DesiredCapabilities.SAFARI, quiet=False): + desired_capabilities=DesiredCapabilities.SAFARI, quiet=False, + keep_alive=True): """ Creates a new Safari driver instance and launches or finds a running safaridriver service. :Args: - port - The port on which the safaridriver service should listen for new connections. If zero, a free port will be found. - - quiet - If True, the driver's stdout and stderr is suppressed. - executable_path - Path to a custom safaridriver executable to be used. If absent, /usr/bin/safaridriver is used. - - desired_capabilities: Dictionary object with desired capabilities (Can be used to provide various Safari switches). - reuse_service - If True, do not spawn a safaridriver instance; instead, connect to an already-running service that was launched externally. + - desired_capabilities: Dictionary object with desired capabilities (Can be used to provide various Safari switches). + - quiet - If True, the driver's stdout and stderr is suppressed. + - keep_alive - Whether to configure SafariRemoteConnection to use + HTTP keep-alive. Defaults to False. """ self._reuse_service = reuse_service @@ -52,7 +55,8 @@ if not reuse_service: self.service.start() - executor = SafariRemoteConnection(remote_server_addr=self.service.service_url) + executor = SafariRemoteConnection(remote_server_addr=self.service.service_url, + keep_alive=keep_alive) RemoteWebDriver.__init__( self, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/webkitgtk/options.py new/selenium-3.14.1/selenium/webdriver/webkitgtk/options.py --- old/selenium-3.14.0/selenium/webdriver/webkitgtk/options.py 2018-05-08 15:56:18.000000000 +0200 +++ new/selenium-3.14.1/selenium/webdriver/webkitgtk/options.py 2018-09-04 16:27:41.000000000 +0200 @@ -25,6 +25,15 @@ self._binary_location = '' self._arguments = [] self._overlay_scrollbars_enabled = True + self._caps = DesiredCapabilities.WEBKITGTK.copy() + + @property + def capabilities(self): + return self._caps + + def set_capability(self, name, value): + """Sets a capability.""" + self._caps[name] = value @property def binary_location(self): @@ -84,7 +93,7 @@ Creates a capabilities with all the options that have been set and returns a dictionary with everything """ - caps = DesiredCapabilities.WEBKITGTK.copy() + caps = self._caps browser_options = {} if self.binary_location: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium/webdriver/webkitgtk/webdriver.py new/selenium-3.14.1/selenium/webdriver/webkitgtk/webdriver.py --- old/selenium-3.14.0/selenium/webdriver/webkitgtk/webdriver.py 2017-11-21 21:41:08.000000000 +0100 +++ new/selenium-3.14.1/selenium/webdriver/webkitgtk/webdriver.py 2018-09-18 04:35:23.000000000 +0200 @@ -32,7 +32,7 @@ def __init__(self, executable_path="WebKitWebDriver", port=0, options=None, desired_capabilities=DesiredCapabilities.WEBKITGTK, - service_log_path=None): + service_log_path=None, keep_alive=False): """ Creates a new instance of the WebKitGTK driver. @@ -44,6 +44,7 @@ - options : an instance of WebKitGTKOptions - desired_capabilities : Dictionary object with desired capabilities - service_log_path : Path to write service stdout and stderr output. + - keep_alive : Whether to configure RemoteConnection to use HTTP keep-alive. """ if options is not None: capabilities = options.to_capabilities() @@ -56,7 +57,8 @@ RemoteWebDriver.__init__( self, command_executor=self.service.service_url, - desired_capabilities=desired_capabilities) + desired_capabilities=desired_capabilities, + keep_alive=keep_alive) self._is_remote = False def quit(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium.egg-info/PKG-INFO new/selenium-3.14.1/selenium.egg-info/PKG-INFO --- old/selenium-3.14.0/selenium.egg-info/PKG-INFO 2018-08-02 15:22:42.000000000 +0200 +++ new/selenium-3.14.1/selenium.egg-info/PKG-INFO 2018-09-20 21:20:47.000000000 +0200 @@ -1,11 +1,12 @@ -Metadata-Version: 1.2 +Metadata-Version: 1.1 Name: selenium -Version: 3.14.0 +Version: 3.14.1 Summary: Python bindings for Selenium Home-page: https://github.com/SeleniumHQ/selenium/ -Maintainer: david.burns -Maintainer-email: david.bu...@theautomatedtester.co.uk +Author: UNKNOWN +Author-email: UNKNOWN License: Apache 2.0 +Description-Content-Type: UNKNOWN Description: ====================== Selenium Client Driver ====================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/selenium.egg-info/SOURCES.txt new/selenium-3.14.1/selenium.egg-info/SOURCES.txt --- old/selenium-3.14.0/selenium.egg-info/SOURCES.txt 2018-08-02 15:22:42.000000000 +0200 +++ new/selenium-3.14.1/selenium.egg-info/SOURCES.txt 2018-09-20 21:20:47.000000000 +0200 @@ -1,4 +1,5 @@ CHANGES +LICENSE MANIFEST.in README.rst setup.cfg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.14.0/setup.py new/selenium-3.14.1/setup.py --- old/selenium-3.14.0/setup.py 2018-08-02 15:18:17.000000000 +0200 +++ new/selenium-3.14.1/setup.py 2018-09-20 20:22:22.000000000 +0200 @@ -29,7 +29,7 @@ setup_args = { 'cmdclass': {'install': install}, 'name': 'selenium', - 'version': "3.14.0", + 'version': "3.14.1", 'license': 'Apache 2.0', 'description': 'Python bindings for Selenium', 'long_description': open(join(abspath(dirname(__file__)), "README.rst")).read(), @@ -69,10 +69,7 @@ 'selenium.webdriver.support', ], 'include_package_data': True, 'install_requires': ['urllib3'], - 'zip_safe': False, - 'maintainer':'david.burns', - 'maintainer_email':'david.bu...@theautomatedtester.co.uk' - + 'zip_safe': False } setup(**setup_args)