Hello community, here is the log from the commit of package python-selenium for openSUSE:Factory checked in at 2018-05-11 09:18:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-selenium (Old) and /work/SRC/openSUSE:Factory/.python-selenium.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-selenium" Fri May 11 09:18:38 2018 rev:7 rq:606271 version:3.12.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-selenium/python-selenium.changes 2018-03-28 10:33:51.511700157 +0200 +++ /work/SRC/openSUSE:Factory/.python-selenium.new/python-selenium.changes 2018-05-11 09:18:39.245691403 +0200 @@ -1,0 +2,6 @@ +Thu May 10 15:09:23 UTC 2018 - [email protected] + +- update to version 3.12.0: + * no changelog available + +------------------------------------------------------------------- Old: ---- selenium-3.11.0.tar.gz New: ---- selenium-3.12.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-selenium.spec ++++++ --- /var/tmp/diff_new_pack.CGJxNS/_old 2018-05-11 09:18:42.713565754 +0200 +++ /var/tmp/diff_new_pack.CGJxNS/_new 2018-05-11 09:18:42.717565609 +0200 @@ -18,12 +18,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-selenium -Version: 3.11.0 +Version: 3.12.0 Release: 0 Summary: Python bindings for Selenium License: Apache-2.0 Group: Development/Languages/Python -Url: https://github.com/SeleniumHQ/selenium +URL: https://github.com/SeleniumHQ/selenium Source: https://files.pythonhosted.org/packages/source/s/selenium/selenium-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module rdflib} ++++++ selenium-3.11.0.tar.gz -> selenium-3.12.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/PKG-INFO new/selenium-3.12.0/PKG-INFO --- old/selenium-3.11.0/PKG-INFO 2018-03-12 12:52:12.000000000 +0100 +++ new/selenium-3.12.0/PKG-INFO 2018-05-08 16:37:44.000000000 +0200 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: selenium -Version: 3.11.0 +Version: 3.12.0 Summary: Python bindings for Selenium Home-page: https://github.com/SeleniumHQ/selenium/ Author: UNKNOWN Author-email: UNKNOWN License: Apache 2.0 -Description-Content-Type: UNKNOWN Description: ====================== Selenium Client Driver ====================== @@ -44,7 +43,7 @@ pip install -U selenium - Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-3.11.0.tar.gz), unarchive it, and run:: + Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-3.12.0.tar.gz), unarchive it, and run:: python setup.py install @@ -136,11 +135,11 @@ 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.11/selenium-server-standalone-3.11.0.jar + Download the server separately, from: http://selenium-release.storage.googleapis.com/3.12/selenium-server-standalone-3.12.0.jar Run the server from the command line:: - java -jar selenium-server-standalone-3.11.0.jar + java -jar selenium-server-standalone-3.12.0.jar Then run your Python client scripts. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/README.rst new/selenium-3.12.0/README.rst --- old/selenium-3.11.0/README.rst 2018-03-12 12:46:15.000000000 +0100 +++ new/selenium-3.12.0/README.rst 2018-05-08 15:56:18.000000000 +0200 @@ -35,7 +35,7 @@ pip install -U selenium -Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-3.11.0.tar.gz), unarchive it, and run:: +Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-3.12.0.tar.gz), unarchive it, and run:: python setup.py install @@ -127,11 +127,11 @@ 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.11/selenium-server-standalone-3.11.0.jar +Download the server separately, from: http://selenium-release.storage.googleapis.com/3.12/selenium-server-standalone-3.12.0.jar Run the server from the command line:: - java -jar selenium-server-standalone-3.11.0.jar + java -jar selenium-server-standalone-3.12.0.jar Then run your Python client scripts. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/__init__.py new/selenium-3.12.0/selenium/__init__.py --- old/selenium-3.11.0/selenium/__init__.py 2018-03-12 12:46:15.000000000 +0100 +++ new/selenium-3.12.0/selenium/__init__.py 2018-05-08 15:56:18.000000000 +0200 @@ -16,4 +16,4 @@ # under the License. -__version__ = "3.11.0" +__version__ = "3.12.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/__init__.py new/selenium-3.12.0/selenium/webdriver/__init__.py --- old/selenium-3.11.0/selenium/webdriver/__init__.py 2018-03-05 10:36:38.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/__init__.py 2018-05-08 15:56:18.000000000 +0200 @@ -21,6 +21,7 @@ from .chrome.webdriver import WebDriver as Chrome # noqa from .chrome.options import Options as ChromeOptions # noqa from .ie.webdriver import WebDriver as Ie # noqa +from .ie.options import Options as IeOptions # noqa from .edge.webdriver import WebDriver as Edge # noqa from .opera.webdriver import WebDriver as Opera # noqa from .safari.webdriver import WebDriver as Safari # noqa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/chrome/options.py new/selenium-3.12.0/selenium/webdriver/chrome/options.py --- old/selenium-3.11.0/selenium/webdriver/chrome/options.py 2017-11-21 21:41:08.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/chrome/options.py 2018-05-08 15:56:18.000000000 +0200 @@ -17,6 +17,8 @@ import base64 import os +import platform +import warnings from selenium.webdriver.common.desired_capabilities import DesiredCapabilities @@ -158,26 +160,35 @@ """ return '--headless' in self._arguments - def set_headless(self, headless=True): + @headless.setter + def headless(self, value): """ Sets the headless argument Args: - headless: boolean value indicating to set the headless option + value: boolean value indicating to set the headless option """ - args = {'--headless', '--disable-gpu'} - if headless: + args = {'--headless'} + if platform.system().lower() == 'windows': + args.add('--disable-gpu') + if value is True: self._arguments.extend(args) else: self._arguments = list(set(self._arguments) - args) + def set_headless(self, headless=True): + """ Deprecated, options.headless = True """ + warnings.warn('use setter for headless property instead of set_headless', + DeprecationWarning) + self.headless = headless + def to_capabilities(self): """ Creates a capabilities with all the options that have been set and returns a dictionary with everything """ - chrome = DesiredCapabilities.CHROME.copy() + caps = DesiredCapabilities.CHROME.copy() chrome_options = self.experimental_options.copy() chrome_options["extensions"] = self.extensions @@ -187,6 +198,6 @@ if self.debugger_address: chrome_options["debuggerAddress"] = self.debugger_address - chrome[self.KEY] = chrome_options + caps[self.KEY] = chrome_options - return chrome + return caps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/common/alert.py new/selenium-3.12.0/selenium/webdriver/common/alert.py --- old/selenium-3.11.0/selenium/webdriver/common/alert.py 2017-04-12 11:53:15.000000000 +0200 +++ new/selenium-3.12.0/selenium/webdriver/common/alert.py 2018-05-08 15:56:18.000000000 +0200 @@ -103,20 +103,3 @@ 'text': keysToSend}) else: self.driver.execute(Command.SET_ALERT_VALUE, {'text': keysToSend}) - - def authenticate(self, username, password): - """ - Send the username / password to an Authenticated dialog (like with Basic HTTP Auth). - Implicitly 'clicks ok' - - Usage:: - driver.switch_to.alert.authenticate('cheese', 'secretGouda') - - :Args: - -username: string to be set in the username section of the dialog - -password: string to be set in the password section of the dialog - """ - self.driver.execute( - Command.SET_ALERT_CREDENTIALS, - {'username': username, 'password': password}) - self.accept() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/firefox/options.py new/selenium-3.12.0/selenium/webdriver/firefox/options.py --- old/selenium-3.11.0/selenium/webdriver/firefox/options.py 2017-11-21 21:41:08.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/firefox/options.py 2018-05-08 15:56:18.000000000 +0200 @@ -14,7 +14,10 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +import warnings + from selenium.common.exceptions import InvalidArgumentException +from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.common.proxy import Proxy from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from selenium.webdriver.firefox.firefox_profile import FirefoxProfile @@ -119,18 +122,25 @@ """ return '-headless' in self._arguments - def set_headless(self, headless=True): + @headless.setter + def headless(self, value): """ Sets the headless argument Args: - headless: boolean value indicating to set the headless option + value: boolean value indicating to set the headless option """ - if headless: + if value is True: self._arguments.append('-headless') elif '-headless' in self._arguments: self._arguments.remove('-headless') + def set_headless(self, headless=True): + """ Deprecated, options.headless = True """ + warnings.warn('use setter for headless property instead of set_headless', + DeprecationWarning) + self.headless = headless + def to_capabilities(self): """Marshals the Firefox options to a `moz:firefoxOptions` object. @@ -140,6 +150,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() opts = {} if self._binary is not None: @@ -156,5 +167,6 @@ opts.update(self.log.to_capabilities()) if len(opts) > 0: - return {Options.KEY: opts} - return {} + caps[Options.KEY] = opts + + return caps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/firefox/webdriver.py new/selenium-3.12.0/selenium/webdriver/firefox/webdriver.py --- old/selenium-3.11.0/selenium/webdriver/firefox/webdriver.py 2018-03-05 10:36:38.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/firefox/webdriver.py 2018-03-14 09:59:22.000000000 +0100 @@ -57,7 +57,7 @@ timeout=30, capabilities=None, proxy=None, executable_path="geckodriver", options=None, log_path="geckodriver.log", firefox_options=None, - service_args=None): + service_args=None, desired_capabilities=None): """Starts a new local session of Firefox. Based on the combination and specificity of the various keyword @@ -101,6 +101,9 @@ defaults to picking up the binary from the system path. :param options: Instance of ``options.Options``. :param log_path: Where to log information from the driver. + :param desired_capabilities: alias of capabilities. In future + versions of this library, this will replace 'capabilities'. + This will make the signature consistent with RemoteWebDriver. """ if firefox_options: @@ -110,6 +113,11 @@ self.profile = None self.service = None + # If desired capabilities is set, alias it to capabilities. + # If both are set ignore desired capabilities. + if capabilities is None and desired_capabilities: + capabilities = desired_capabilities + if capabilities is None: capabilities = DesiredCapabilities.FIREFOX.copy() if options is None: Binary files old/selenium-3.11.0/selenium/webdriver/firefox/webdriver.xpi and new/selenium-3.12.0/selenium/webdriver/firefox/webdriver.xpi differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/ie/options.py new/selenium-3.12.0/selenium/webdriver/ie/options.py --- old/selenium-3.11.0/selenium/webdriver/ie/options.py 2017-09-14 22:43:26.000000000 +0200 +++ new/selenium-3.12.0/selenium/webdriver/ie/options.py 2018-05-08 15:56:18.000000000 +0200 @@ -14,6 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +from selenium.webdriver.common.desired_capabilities import DesiredCapabilities class ElementScrollBehavior(object): @@ -327,6 +328,8 @@ def to_capabilities(self): """ Marshals the IE options to a the correct object """ + caps = DesiredCapabilities.INTERNETEXPLORER.copy() + opts = self._options.copy() if len(self._arguments) > 0: opts[self.SWITCHES] = ' '.join(self._arguments) @@ -335,5 +338,5 @@ opts.update(self._additional) if len(opts) > 0: - return {self.KEY: opts} - return {} + caps[Options.KEY] = opts + return caps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/ie/webdriver.py new/selenium-3.12.0/selenium/webdriver/ie/webdriver.py --- old/selenium-3.11.0/selenium/webdriver/ie/webdriver.py 2017-11-21 21:41:08.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/ie/webdriver.py 2018-03-14 09:59:22.000000000 +0100 @@ -18,7 +18,6 @@ from selenium.webdriver.common import utils from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver -from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from .service import Service from .options import Options @@ -35,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, log_file=DEFAULT_LOG_FILE, options=None, - ie_options=None): + ie_options=None, desired_capabilities=None): """ Creates a new instance of the chrome driver. @@ -48,6 +47,7 @@ - log_level - log level you would like the service to run. - log_file - log file you would like the service to log to. - options: IE Options instance, providing additional IE options + - desired_capabilities: alias of capabilities; this will make the signature consistent with RemoteWebDriver. """ if ie_options: warnings.warn('use options instead of ie_options', DeprecationWarning) @@ -59,14 +59,18 @@ self.log_level = log_level self.log_file = log_file + # If both capabilities and desired capabilities are set, ignore desired capabilities. + if capabilities is None and desired_capabilities: + capabilities = desired_capabilities + if options is None: - # desired_capabilities stays as passed in if capabilities is None: capabilities = self.create_options().to_capabilities() else: if capabilities is None: capabilities = options.to_capabilities() else: + # desired_capabilities stays as passed in capabilities.update(options.to_capabilities()) self.iedriver = Service( @@ -78,9 +82,6 @@ self.iedriver.start() - if capabilities is None: - capabilities = DesiredCapabilities.INTERNETEXPLORER - RemoteWebDriver.__init__( self, command_executor='http://localhost:%d' % self.port, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/remote/isDisplayed.js new/selenium-3.12.0/selenium/webdriver/remote/isDisplayed.js --- old/selenium-3.11.0/selenium/webdriver/remote/isDisplayed.js 2018-03-12 12:51:16.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/remote/isDisplayed.js 2018-05-08 16:06:44.000000000 +0200 @@ -37,18 +37,18 @@ y.prototype.toString=function(){var a="Kind Test: "+this.h;null===this.c||(a+=z(this.c));return a};function ya(a,b){this.j=a.toLowerCase();a="*"==this.j?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():a}ya.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=l(a.localName)?a.localName:a.nodeName;return"*"!=this.j&&this.j!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};ya.prototype.f=function(){return this.j}; ya.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.j};function za(a){switch(a.nodeType){case 1:return fa(Aa,a);case 9:return za(a.documentElement);case 11:case 10:case 6:case 12:return Ba;default:return a.parentNode?za(a.parentNode):Ba}}function Ba(){return null}function Aa(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?Aa(a.parentNode,b):null};function Ca(a,b){if(m(a))return m(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function A(a,b){for(var c=a.length,d=m(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function Da(a,b){for(var c=a.length,d=[],e=0,f=m(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var h=f[g];b.call(void 0,h,g,a)&&(d[e++]=h)}return d}function Ea(a,b,c){var d=c;A(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d} function Fa(a,b){for(var c=a.length,d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function Ga(a,b){for(var c=a.length,d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0}function Ha(a,b){a:{for(var c=a.length,d=m(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:m(a)?a.charAt(b):a[b]}function Ia(a){return Array.prototype.concat.apply([],arguments)} -function Ja(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};function Ka(){return x("iPhone")&&!x("iPod")&&!x("iPad")};var La="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ma=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Na=/^#(?:[0-9a-f]{3}){1,2}$/i,Oa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Pa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Qa(){return(x("Chrome")||x("CriOS"))&&!x("Edge")};function Ra(a,b){this.x=l(a)?a:0;this.y=l(b)?b:0}Ra.prototype.toString=function(){return"("+this.x+", "+this.y+")"};Ra.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};Ra.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};Ra.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};var Sa=x("Opera"),C=x("Trident")||x("MSIE"),Ta=x("Edge"),Ua=x("Gecko")&&!(-1!=v.toLowerCase().indexOf("webkit")&&!x("Edge"))&&!(x("Trident")||x("MSIE"))&&!x("Edge"),Va=-1!=v.toLowerCase().indexOf("webkit")&&!x("Edge");function Wa(){var a=k.document;return a?a.documentMode:void 0}var Xa; -a:{var Ya="",Za=function(){var a=v;if(Ua)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Ta)return/Edge\/([\d\.]+)/.exec(a);if(C)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Va)return/WebKit\/(\S+)/.exec(a);if(Sa)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Za&&(Ya=Za?Za[1]:"");if(C){var $a=Wa();if(null!=$a&&$a>parseFloat(Ya)){Xa=String($a);break a}}Xa=Ya}var la={}; +function Ja(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};function Ka(){return x("iPhone")&&!x("iPod")&&!x("iPad")};var La="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ma=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Na=/^#(?:[0-9a-f]{3}){1,2}$/i,Oa=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Pa=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function Qa(){return(x("Chrome")||x("CriOS"))&&!x("Edge")};function Ra(a,b){this.x=l(a)?a:0;this.y=l(b)?b:0}Ra.prototype.toString=function(){return"("+this.x+", "+this.y+")"};Ra.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};Ra.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};Ra.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};var Sa=x("Opera"),B=x("Trident")||x("MSIE"),Ta=x("Edge"),Ua=x("Gecko")&&!(-1!=v.toLowerCase().indexOf("webkit")&&!x("Edge"))&&!(x("Trident")||x("MSIE"))&&!x("Edge"),Va=-1!=v.toLowerCase().indexOf("webkit")&&!x("Edge");function Wa(){var a=k.document;return a?a.documentMode:void 0}var Xa; +a:{var Ya="",Za=function(){var a=v;if(Ua)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Ta)return/Edge\/([\d\.]+)/.exec(a);if(B)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Va)return/WebKit\/(\S+)/.exec(a);if(Sa)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Za&&(Ya=Za?Za[1]:"");if(B){var $a=Wa();if(null!=$a&&$a>parseFloat(Ya)){Xa=String($a);break a}}Xa=Ya}var la={}; function ab(a){return ka(a,function(){for(var b=0,c=ma(String(Xa)).split("."),d=ma(String(a)).split("."),e=Math.max(c.length,d.length),f=0;!b&&f<e;f++){var g=c[f]||"",h=d[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==g[0].length&&0==h[0].length)break;b=na(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||na(0==g[2].length,0==h[2].length)||na(g[2],h[2]);g=g[3];h=h[3]}while(!b)}return 0<=b})}var bb;var cb=k.document; -bb=cb&&C?Wa()||("CSS1Compat"==cb.compatMode?parseInt(Xa,10):5):void 0;function db(a,b,c,d){this.c=a;this.a=b;this.b=c;this.f=d}db.prototype.toString=function(){return"("+this.c+"t, "+this.a+"r, "+this.b+"b, "+this.f+"l)"};db.prototype.ceil=function(){this.c=Math.ceil(this.c);this.a=Math.ceil(this.a);this.b=Math.ceil(this.b);this.f=Math.ceil(this.f);return this};db.prototype.floor=function(){this.c=Math.floor(this.c);this.a=Math.floor(this.a);this.b=Math.floor(this.b);this.f=Math.floor(this.f);return this}; -db.prototype.round=function(){this.c=Math.round(this.c);this.a=Math.round(this.a);this.b=Math.round(this.b);this.f=Math.round(this.f);return this};var eb=x("Firefox"),fb=Ka()||x("iPod"),gb=x("iPad"),hb=x("Android")&&!(Qa()||x("Firefox")||x("Opera")||x("Silk")),ib=Qa(),jb=x("Safari")&&!(Qa()||x("Coast")||x("Opera")||x("Edge")||x("Silk")||x("Android"))&&!(Ka()||x("iPad")||x("iPod"));var D=C&&!(9<=Number(bb)),kb=C&&!(8<=Number(bb));function E(a,b,c,d){this.a=a;this.b=b;this.width=c;this.height=d}E.prototype.toString=function(){return"("+this.a+", "+this.b+" - "+this.width+"w x "+this.height+"h)"};E.prototype.ceil=function(){this.a=Math.ceil(this.a);this.b=Math.ceil(this.b);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};E.prototype.floor=function(){this.a=Math.floor(this.a);this.b=Math.floor(this.b);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; -E.prototype.round=function(){this.a=Math.round(this.a);this.b=Math.round(this.b);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function lb(a){return(a=a.exec(v))?a[1]:""}(function(){if(eb)return lb(/Firefox\/([0-9.]+)/);if(C||Ta||Sa)return Xa;if(ib)return Ka()||x("iPad")||x("iPod")?lb(/CriOS\/([0-9.]+)/):lb(/Chrome\/([0-9.]+)/);if(jb&&!(Ka()||x("iPad")||x("iPod")))return lb(/Version\/([0-9.]+)/);if(fb||gb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(v);if(a)return a[1]+"."+a[2]}else if(hb)return(a=lb(/Android\s+([0-9.]+)/))?a:lb(/Version\/([0-9.]+)/);return""})();function mb(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function nb(a,b){var c=kb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new mb(b,a,b.nodeName,c)};var ob,pb=function(){if(!Ua)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(e){return!1}var b=a.classes,a=a.interfaces,c=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),d=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).version;ob=function(a){c.compare(d,""+a)};return!0}(),qb=C&&!(9<=Number(bb));hb&&pb&&ob(2.3);hb&&pb&&ob(4);jb&&pb&&ob(6);function rb(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} -function sb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(C&&!(9<=Number(bb))){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?tb(a,b):!c&&rb(e,b)?-1*ub(a,b):!d&&rb(f,a)?ub(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); +bb=cb&&B?Wa()||("CSS1Compat"==cb.compatMode?parseInt(Xa,10):5):void 0;function db(a,b,c,d){this.c=a;this.a=b;this.b=c;this.f=d}db.prototype.toString=function(){return"("+this.c+"t, "+this.a+"r, "+this.b+"b, "+this.f+"l)"};db.prototype.ceil=function(){this.c=Math.ceil(this.c);this.a=Math.ceil(this.a);this.b=Math.ceil(this.b);this.f=Math.ceil(this.f);return this};db.prototype.floor=function(){this.c=Math.floor(this.c);this.a=Math.floor(this.a);this.b=Math.floor(this.b);this.f=Math.floor(this.f);return this}; +db.prototype.round=function(){this.c=Math.round(this.c);this.a=Math.round(this.a);this.b=Math.round(this.b);this.f=Math.round(this.f);return this};var eb=x("Firefox"),fb=Ka()||x("iPod"),gb=x("iPad"),hb=x("Android")&&!(Qa()||x("Firefox")||x("Opera")||x("Silk")),ib=Qa(),jb=x("Safari")&&!(Qa()||x("Coast")||x("Opera")||x("Edge")||x("Silk")||x("Android"))&&!(Ka()||x("iPad")||x("iPod"));var D=B&&!(9<=Number(bb)),kb=B&&!(8<=Number(bb));function E(a,b,c,d){this.a=a;this.b=b;this.width=c;this.height=d}E.prototype.toString=function(){return"("+this.a+", "+this.b+" - "+this.width+"w x "+this.height+"h)"};E.prototype.ceil=function(){this.a=Math.ceil(this.a);this.b=Math.ceil(this.b);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};E.prototype.floor=function(){this.a=Math.floor(this.a);this.b=Math.floor(this.b);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; +E.prototype.round=function(){this.a=Math.round(this.a);this.b=Math.round(this.b);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function lb(a){return(a=a.exec(v))?a[1]:""}(function(){if(eb)return lb(/Firefox\/([0-9.]+)/);if(B||Ta||Sa)return Xa;if(ib)return Ka()||x("iPad")||x("iPod")?lb(/CriOS\/([0-9.]+)/):lb(/Chrome\/([0-9.]+)/);if(jb&&!(Ka()||x("iPad")||x("iPod")))return lb(/Version\/([0-9.]+)/);if(fb||gb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(v);if(a)return a[1]+"."+a[2]}else if(hb)return(a=lb(/Android\s+([0-9.]+)/))?a:lb(/Version\/([0-9.]+)/);return""})();function mb(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function nb(a,b){var c=kb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new mb(b,a,b.nodeName,c)};var ob,pb=function(){if(!Ua)return!1;var a=k.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(e){return!1}var b=a.classes,a=a.interfaces,c=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),d=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).version;ob=function(a){c.compare(d,""+a)};return!0}(),qb=B&&!(9<=Number(bb));hb&&pb&&ob(2.3);hb&&pb&&ob(4);jb&&pb&&ob(6);function rb(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a} +function sb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(B&&!(9<=Number(bb))){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?tb(a,b):!c&&rb(e,b)?-1*ub(a,b):!d&&rb(f,a)?ub(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=F(a);c=d.createRange(); c.selectNode(a);c.collapse(!0);a=d.createRange();a.selectNode(b);a.collapse(!0);return c.compareBoundaryPoints(k.Range.START_TO_END,a)}function ub(a,b){var c=a.parentNode;if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return tb(b,a)}function tb(a,b){for(;b=b.previousSibling;)if(b==a)return-1;return 1}function F(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function vb(a,b){a&&(a=a.parentNode);for(var c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null} function wb(a){this.a=a||k.document||document}wb.prototype.getElementsByTagName=function(a,b){return(b||this.a).getElementsByTagName(String(a))};function G(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(D&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),D&&"title"==a.nodeName.toLowerCase()&&(b+=a.text),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return""+b} function H(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}kb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function xb(a,b,c,d,e){return(D?yb:zb).call(null,a,b,m(c)?c:null,m(d)?d:null,e||new I)} function yb(a,b,c,d,e){if(a instanceof ya||8==a.b||c&&null===a.b){var f=b.all;if(!f)return e;var g=Ab(a);if("*"!=g&&(f=b.getElementsByTagName(g),!f))return e;if(c){var h=[];for(a=0;b=f[a++];)H(b,c,d)&&h.push(b);f=h}for(a=0;b=f[a++];)"*"==g&&"!"==b.tagName||J(e,b);return e}Bb(a,b,c,d,e);return e} -function zb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!C?(b=b.getElementsByName(d),A(b,function(b){a.a(b)&&J(e,b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),A(b,function(b){b.className==d&&a.a(b)&&J(e,b)})):a instanceof y?Bb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),A(b,function(a){H(a,c,d)&&J(e,a)}));return e} +function zb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!B?(b=b.getElementsByName(d),A(b,function(b){a.a(b)&&J(e,b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),A(b,function(b){b.className==d&&a.a(b)&&J(e,b)})):a instanceof y?Bb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),A(b,function(a){H(a,c,d)&&J(e,a)}));return e} function Cb(a,b,c,d,e){var f;if((a instanceof ya||8==a.b||c&&null===a.b)&&(f=b.childNodes)){var g=Ab(a);if("*"!=g&&(f=Da(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=Da(f,function(a){return H(a,c,d)}));A(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||J(e,a)});return e}return Db(a,b,c,d,e)}function Db(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.a(b)&&J(e,b);return e} function Bb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)H(b,c,d)&&a.a(b)&&J(e,b),Bb(a,b,c,d,e)}function Ab(a){if(a instanceof y){if(8==a.b)return"!";if(null===a.b)return"*"}return a.f()};function K(a,b){b&&"string"!==typeof b&&(b=b.toString());return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)};function I(){this.b=this.a=null;this.l=0}function Eb(a){this.node=a;this.a=this.b=null}function Fb(a,b){if(!a.a)return b;if(!b.a)return a;var c=a.a;b=b.a;for(var d=null,e,f=0;c&&b;){e=c.node;var g=b.node;e==g||e instanceof mb&&g instanceof mb&&e.a==g.a?(e=c,c=c.a,b=b.a):0<sb(c.node,b.node)?(e=b,b=b.a):(e=c,c=c.a);(e.b=d)?d.a=e:a.a=e;d=e;f++}for(e=c||b;e;)e.b=d,d=d.a=e,f++,e=e.a;a.b=d;a.l=f;return a}function Gb(a,b){b=new Eb(b);b.a=a.a;a.b?a.a.b=b:a.a=a.b=b;a.a=b;a.l++} function J(a,b){b=new Eb(b);b.b=a.b;a.a?a.b.a=b:a.a=a.b=b;a.b=b;a.l++}function Hb(a){return(a=a.a)?a.node:null}function Ib(a){return(a=Hb(a))?G(a):""}function L(a,b){return new Jb(a,!!b)}function Jb(a,b){this.f=a;this.b=(this.s=b)?a.b:a.a;this.a=null}function N(a){var b=a.b;if(b){var c=a.a=b;a.b=a.s?b.b:b.a;return c.node}return null};function O(a){this.i=a;this.b=this.g=!1;this.f=null}function z(a){return"\n "+a.toString().split("\n").join("\n ")}function Kb(a,b){a.g=b}function Lb(a,b){a.b=b}function Q(a,b){a=a.a(b);return a instanceof I?+Ib(a):+a}function R(a,b){a=a.a(b);return a instanceof I?Ib(a):""+a}function Mb(a,b){a=a.a(b);return a instanceof I?!!a.l:!!a};function Nb(a,b,c){O.call(this,a.i);this.c=a;this.h=b;this.o=c;this.g=b.g||c.g;this.b=b.b||c.b;this.c==Ob&&(c.b||c.g||4==c.i||0==c.i||!b.f?b.b||b.g||4==b.i||0==b.i||!c.f||(this.f={name:c.f.name,u:b}):this.f={name:b.f.name,u:c})}p(Nb,O); @@ -84,7 +84,7 @@ L(a);var d=[];for(var e=N(c);e;e=N(c))d.push(e instanceof mb?e.a:e);this.snapshotLength=a.l;this.invalidIteratorState=!1;break;case 8:case 9:a=Hb(a);this.singleNodeValue=a instanceof mb?a.a:a;break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=d.length?null:d[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=d.length|| 0>a?null:d[a]}}X.ANY_TYPE=0;X.NUMBER_TYPE=1;X.STRING_TYPE=2;X.BOOLEAN_TYPE=3;X.UNORDERED_NODE_ITERATOR_TYPE=4;X.ORDERED_NODE_ITERATOR_TYPE=5;X.UNORDERED_NODE_SNAPSHOT_TYPE=6;X.ORDERED_NODE_SNAPSHOT_TYPE=7;X.ANY_UNORDERED_NODE_TYPE=8;X.FIRST_ORDERED_NODE_TYPE=9;function yc(a){this.lookupNamespaceURI=za(a)} function zc(a,b){a=a||k;var c=a.Document&&a.Document.prototype||a.document;if(!c.evaluate||b)a.XPathResult=X,c.evaluate=function(a,b,c,g){return(new xc(a,c)).evaluate(b,g)},c.createExpression=function(a,b){return new xc(a,b)},c.createNSResolver=function(a){return new yc(a)}}aa("wgxpath.install",zc);var Ac=function(){var a={M:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}(); -function Bc(a,b){var c=F(a);if(!c.documentElement)return null;(C||hb)&&zc(c?c.parentWindow||c.defaultView:window);try{var d=c.createNSResolver?c.createNSResolver(c.documentElement):Ac;if(C&&!ab(7))return c.evaluate.call(c,b,a,d,9,null);if(!C||9<=Number(bb)){for(var e={},f=c.getElementsByTagName("*"),g=0;g<f.length;++g){var h=f[g],r=h.namespaceURI;if(r&&!e[r]){var w=h.lookupPrefix(r);if(!w)var n=r.match(".*/(\\w+)/?$"),w=n?n[1]:"xhtml";e[r]=w}}var B={},M;for(M in e)B[e[M]]=M;d=function(a){return B[a]|| +function Bc(a,b){var c=F(a);if(!c.documentElement)return null;(B||hb)&&zc(c?c.parentWindow||c.defaultView:window);try{var d=c.createNSResolver?c.createNSResolver(c.documentElement):Ac;if(B&&!ab(7))return c.evaluate.call(c,b,a,d,9,null);if(!B||9<=Number(bb)){for(var e={},f=c.getElementsByTagName("*"),g=0;g<f.length;++g){var h=f[g],r=h.namespaceURI;if(r&&!e[r]){var w=h.lookupPrefix(r);if(!w)var n=r.match(".*/(\\w+)/?$"),w=n?n[1]:"xhtml";e[r]=w}}var C={},M;for(M in e)C[e[M]]=M;d=function(a){return C[a]|| null}}try{return c.evaluate(b,a,d,9,null)}catch(P){if("TypeError"===P.name)return d=c.createNSResolver?c.createNSResolver(c.documentElement):Ac,c.evaluate(b,a,d,9,null);throw P;}}catch(P){if(!Ua||"NS_ERROR_ILLEGAL_VALUE"!=P.name)throw new ga(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+P);}} function Cc(a,b){var c=function(){var c=Bc(b,a);return c?c.singleNodeValue||null:b.selectSingleNode?(c=F(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();if(null!==c&&(!c||1!=c.nodeType))throw new ga(32,'The result of the xpath expression "'+a+'" is: '+c+". It should be an element.");return c};var Dc="function"===typeof ShadowRoot;function Ec(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return K(a)?a:null} function Y(a,b){b=oa(b);if("float"==b||"cssFloat"==b||"styleFloat"==b)b=qb?"styleFloat":"cssFloat";a:{var c=b;var d=F(a);if(d.defaultView&&d.defaultView.getComputedStyle&&(d=d.defaultView.getComputedStyle(a,null))){c=d[c]||d.getPropertyValue(c)||"";break a}c=""}a=c||Fc(a,b);if(null===a)a=null;else if(0<=Ca(La,b)){b:{var e=a.match(Oa);if(e&&(b=Number(e[1]),c=Number(e[2]),d=Number(e[3]),e=Number(e[4]),0<=b&&255>=b&&0<=c&&255>=c&&0<=d&&255>=d&&0<=e&&1>=e)){b=[b,c,d,e];break b}b=null}if(!b)b:{if(d=a.match(Pa))if(b= @@ -93,9 +93,9 @@ function Gc(a,b,c){function d(a){var b=Hc(a);return 0<b.height&&0<b.width?!0:K(a,"PATH")&&(0<b.height||0<b.width)?(a=Y(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=Y(a,"overflow")&&Fa(a.childNodes,function(a){return 3==a.nodeType||K(a)&&d(a)})}function e(a){return Ic(a)==Z&&Ga(a.childNodes,function(a){return!K(a)||e(a)||!d(a)})}if(!K(a))throw Error("Argument to isShown must be of type Element");if(K(a,"BODY"))return!0;if(K(a,"OPTION")||K(a,"OPTGROUP"))return a=vb(a,function(a){return K(a,"SELECT")}), !!a&&Gc(a,!0,c);var f=Jc(a);if(f)return!!f.B&&0<f.rect.width&&0<f.rect.height&&Gc(f.B,b,c);if(K(a,"INPUT")&&"hidden"==a.type.toLowerCase()||K(a,"NOSCRIPT"))return!1;f=Y(a,"visibility");return"collapse"!=f&&"hidden"!=f&&c(a)&&(b||Kc(a))&&d(a)?!e(a):!1}var Z="hidden"; function Ic(a){function b(a){function b(a){return a==g?!0:!Y(a,"display").lastIndexOf("inline",0)||"absolute"==c&&"static"==Y(a,"position")?!1:!0}var c=Y(a,"position");if("fixed"==c)return w=!0,a==g?null:g;for(a=Ec(a);a&&!b(a);)a=Ec(a);return a}function c(a){var b=a;if("visible"==r)if(a==g&&h)b=h;else if(a==h)return{x:"visible",y:"visible"};b={x:Y(b,"overflow-x"),y:Y(b,"overflow-y")};a==g&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function d(a){if(a==g){var b=(new wb(f)).a; -a=b.scrollingElement?b.scrollingElement:Va||"CSS1Compat"!=b.compatMode?b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=C&&ab("10")&&b.pageYOffset!=a.scrollTop?new Ra(a.scrollLeft,a.scrollTop):new Ra(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new Ra(a.scrollLeft,a.scrollTop);return a}var e=Lc(a);var f=F(a),g=f.documentElement,h=f.body,r=Y(g,"overflow"),w;for(a=b(a);a;a=b(a)){var n=c(a);if("visible"!=n.x||"visible"!=n.y){var B=Hc(a);if(!B.width||!B.height)return Z; -var M=e.a<B.a,P=e.b<B.b;if(M&&"hidden"==n.x||P&&"hidden"==n.y)return Z;if(M&&"visible"!=n.x||P&&"visible"!=n.y){M=d(a);P=e.b<B.b-M.y;if(e.a<B.a-M.x&&"visible"!=n.x||P&&"visible"!=n.x)return Z;e=Ic(a);return e==Z?Z:"scroll"}M=e.f>=B.a+B.width;B=e.c>=B.b+B.height;if(M&&"hidden"==n.x||B&&"hidden"==n.y)return Z;if(M&&"visible"!=n.x||B&&"visible"!=n.y){if(w&&(n=d(a),e.f>=g.scrollWidth-n.x||e.a>=g.scrollHeight-n.y))return Z;e=Ic(a);return e==Z?Z:"scroll"}}}return"none"} -function Hc(a){var b=Jc(a);if(b)return b.rect;if(K(a,"HTML"))return a=F(a),a=((a?a.parentWindow||a.defaultView:window)||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new ja(a.clientWidth,a.clientHeight),new E(0,0,a.width,a.height);try{var c=a.getBoundingClientRect()}catch(d){return new E(0,0,0,0)}b=new E(c.left,c.top,c.right-c.left,c.bottom-c.top);C&&a.ownerDocument.body&&(a=F(a),b.a-=a.documentElement.clientLeft+a.body.clientLeft,b.b-=a.documentElement.clientTop+a.body.clientTop); +a=b.scrollingElement?b.scrollingElement:Va||"CSS1Compat"!=b.compatMode?b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=B&&ab("10")&&b.pageYOffset!=a.scrollTop?new Ra(a.scrollLeft,a.scrollTop):new Ra(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new Ra(a.scrollLeft,a.scrollTop);return a}var e=Lc(a);var f=F(a),g=f.documentElement,h=f.body,r=Y(g,"overflow"),w;for(a=b(a);a;a=b(a)){var n=c(a);if("visible"!=n.x||"visible"!=n.y){var C=Hc(a);if(!C.width||!C.height)return Z; +var M=e.a<C.a,P=e.b<C.b;if(M&&"hidden"==n.x||P&&"hidden"==n.y)return Z;if(M&&"visible"!=n.x||P&&"visible"!=n.y){M=d(a);P=e.b<C.b-M.y;if(e.a<C.a-M.x&&"visible"!=n.x||P&&"visible"!=n.x)return Z;e=Ic(a);return e==Z?Z:"scroll"}M=e.f>=C.a+C.width;C=e.c>=C.b+C.height;if(M&&"hidden"==n.x||C&&"hidden"==n.y)return Z;if(M&&"visible"!=n.x||C&&"visible"!=n.y){if(w&&(n=d(a),e.f>=g.scrollWidth-n.x||e.a>=g.scrollHeight-n.y))return Z;e=Ic(a);return e==Z?Z:"scroll"}}}return"none"} +function Hc(a){var b=Jc(a);if(b)return b.rect;if(K(a,"HTML"))return a=F(a),a=((a?a.parentWindow||a.defaultView:window)||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new ja(a.clientWidth,a.clientHeight),new E(0,0,a.width,a.height);try{var c=a.getBoundingClientRect()}catch(d){return new E(0,0,0,0)}b=new E(c.left,c.top,c.right-c.left,c.bottom-c.top);B&&a.ownerDocument.body&&(a=F(a),b.a-=a.documentElement.clientLeft+a.body.clientLeft,b.b-=a.documentElement.clientTop+a.body.clientTop); return b}function Jc(a){var b=K(a,"MAP");if(!b&&!K(a,"AREA"))return null;var c=b?a:K(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;c&&c.name&&(d=Cc('/descendant::*[@usemap = "#'+c.name+'"]',F(c)))&&(e=Hc(d),b||"default"==a.shape.toLowerCase()||(a=Mc(a),b=Math.min(Math.max(a.a,0),e.width),c=Math.min(Math.max(a.b,0),e.height),e=new E(b+e.a,c+e.b,Math.min(a.width,e.width-b),Math.min(a.height,e.height-c))));return{B:d,rect:e||new E(0,0,0,0)}} function Mc(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new E(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new E(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],d=b,e=c,f=2;f+1<a.length;f+=2)b=Math.min(b,a[f]),d=Math.max(d,a[f]),c=Math.min(c,a[f+1]),e=Math.max(e,a[f+1]);return new E(b,c,d-b,e-c)}return new E(0,0,0,0)}function Lc(a){a=Hc(a);return new db(a.b,a.a+a.width,a.b+a.height,a.a)} -function Kc(a){if(qb){if("relative"==Y(a,"position"))return 1;a=Y(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Nc(a)}function Nc(a){var b=1,c=Y(a,"opacity");c&&(b=Number(c));(a=Ec(a))&&(b*=Nc(a));return b};aa("_",function(a,b){var c=Dc?function(b){if("none"==Y(b,"display"))return!1;do{var d=b.parentNode;if(b.getDestinationInsertionPoints){var f=b.getDestinationInsertionPoints();0<f.length&&(d=f[f.length-1])}if(d instanceof ShadowRoot){if(d.host.shadowRoot!=d)return!1;d=d.host}else!d||9!=d.nodeType&&11!=d.nodeType||(d=null)}while(a&&1!=a.nodeType);return!d||c(d)}:function(a){if("none"==Y(a,"display"))return!1;a=Ec(a);return!a||c(a)};return Gc(a,!!b,c)});; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null,document:typeof window!='undefined'?window.document:null}, arguments);} +function Kc(a){if(qb){if("relative"==Y(a,"position"))return 1;a=Y(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Nc(a)}function Nc(a){var b=1,c=Y(a,"opacity");c&&(b=Number(c));(a=Ec(a))&&(b*=Nc(a));return b};aa("_",function(a,b){function c(a){if(K(a)&&"none"==Y(a,"display"))return!1;var b=a.parentNode;b.shadowRoot&&void 0!==a.assignedSlot?b=a.assignedSlot?a.assignedSlot.parentNode:null:a.getDestinationInsertionPoints&&(a=a.getDestinationInsertionPoints(),0<a.length&&(b=a[a.length-1]));if(Dc&&b instanceof ShadowRoot){if(b.host.shadowRoot!==b)return!1;b=b.host}return!b||9!=b.nodeType&&11!=b.nodeType?b&&c(b):!0}return Gc(a,!!b,c)});; 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.11.0/selenium/webdriver/remote/remote_connection.py new/selenium-3.12.0/selenium/webdriver/remote/remote_connection.py --- old/selenium-3.11.0/selenium/webdriver/remote/remote_connection.py 2018-03-05 10:36:38.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/remote/remote_connection.py 2018-04-04 10:58:50.000000000 +0200 @@ -19,6 +19,7 @@ import socket import string import base64 +import platform try: import http.client as httplib @@ -30,6 +31,7 @@ import urlparse as parse from selenium.webdriver.common import utils as common_utils +from selenium import __version__ from .command import Command from .errorhandler import ErrorCode from . import utils @@ -172,10 +174,14 @@ - keep_alive (Boolean) - Is this a keep-alive connection (default: False) """ + system = platform.system().lower() + if system == "darwin": + system = "mac" + headers = { 'Accept': 'application/json', 'Content-Type': 'application/json;charset=UTF-8', - 'User-Agent': 'Python http auth' + 'User-Agent': 'selenium/{} (python {})'.format(__version__, system) } if parsed_url.username: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/remote/webdriver.py new/selenium-3.12.0/selenium/webdriver/remote/webdriver.py --- old/selenium-3.11.0/selenium/webdriver/remote/webdriver.py 2018-03-05 10:36:38.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/remote/webdriver.py 2018-05-08 15:56:18.000000000 +0200 @@ -130,16 +130,18 @@ then default LocalFileDetector() will be used. - options - instance of a driver options.Options class """ - if desired_capabilities is None: - raise WebDriverException("Desired Capabilities can't be None") - if not isinstance(desired_capabilities, dict): - raise WebDriverException("Desired Capabilities must be a dictionary") + capabilities = {} + if options is not None: + capabilities = options.to_capabilities() + if desired_capabilities is not None: + if not isinstance(desired_capabilities, dict): + raise WebDriverException("Desired Capabilities must be a dictionary") + else: + capabilities.update(desired_capabilities) if proxy is not None: warnings.warn("Please use FirefoxOptions to set proxy", DeprecationWarning) - proxy.add_to_capabilities(desired_capabilities) - if options is not None: - desired_capabilities.update(options.to_capabilities()) + proxy.add_to_capabilities(capabilities) self.command_executor = command_executor if type(self.command_executor) is bytes or isinstance(self.command_executor, str): self.command_executor = RemoteConnection(command_executor, keep_alive=keep_alive) @@ -151,7 +153,7 @@ if browser_profile is not None: warnings.warn("Please use FirefoxOptions to set browser profile", DeprecationWarning) - self.start_session(desired_capabilities, browser_profile) + self.start_session(capabilities, browser_profile) self._switch_to = SwitchTo(self) self._mobile = Mobile(self) self.file_detector = file_detector or LocalFileDetector() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/safari/permissions.py new/selenium-3.12.0/selenium/webdriver/safari/permissions.py --- old/selenium-3.11.0/selenium/webdriver/safari/permissions.py 1970-01-01 01:00:00.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/safari/permissions.py 2018-04-04 10:58:50.000000000 +0200 @@ -0,0 +1,28 @@ +# 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. + +""" +The Permission implementation. +""" + + +class Permission(object): + """ + Set of supported permissions. + """ + + GET_USER_MEDIA = "getUserMedia" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/safari/remote_connection.py new/selenium-3.12.0/selenium/webdriver/safari/remote_connection.py --- old/selenium-3.11.0/selenium/webdriver/safari/remote_connection.py 1970-01-01 01:00:00.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/safari/remote_connection.py 2018-04-04 10:58:50.000000000 +0200 @@ -0,0 +1,27 @@ +# 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 SafariRemoteConnection(RemoteConnection): + def __init__(self, remote_server_addr, keep_alive=True): + RemoteConnection.__init__(self, remote_server_addr, keep_alive) + + self._commands["GET_PERMISSIONS"] = ('GET', '/session/$sessionId/apple/permissions') + self._commands["SET_PERMISSIONS"] = ('POST', '/session/$sessionId/apple/permissions') + self._commands["ATTACH_DEBUGGER"] = ('POST', '/session/$sessionId/apple/attach_debugger') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/safari/service.py new/selenium-3.12.0/selenium/webdriver/safari/service.py --- old/selenium-3.11.0/selenium/webdriver/safari/service.py 2016-11-02 11:04:13.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/safari/service.py 2018-05-08 15:56:18.000000000 +0200 @@ -34,7 +34,11 @@ - port : Port the service is running on """ if not os.path.exists(executable_path): - raise Exception("SafariDriver requires Safari 10 on OSX El Capitan or greater") + if "Safari Technology Preview" in executable_path: + message = "Safari Technology Preview does not seem to be installed. You can download it at https://developer.apple.com/safari/download/." + else: + message = "SafariDriver was not found; are you running Safari 10 or later? You can download Safari at https://developer.apple.com/safari/download/." + raise Exception(message) if port == 0: port = utils.free_port() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/safari/webdriver.py new/selenium-3.12.0/selenium/webdriver/safari/webdriver.py --- old/selenium-3.11.0/selenium/webdriver/safari/webdriver.py 2018-03-05 10:36:38.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/safari/webdriver.py 2018-04-04 10:58:50.000000000 +0200 @@ -14,6 +14,7 @@ # 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 try: import http.client as http_client @@ -22,6 +23,8 @@ from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver +from .service import Service +from .remote_connection import SafariRemoteConnection class WebDriver(RemoteWebDriver): @@ -45,13 +48,17 @@ """ self._reuse_service = reuse_service + self.service = Service(executable_path, port=port, quiet=quiet) if not reuse_service: self.service.start() + executor = SafariRemoteConnection(remote_server_addr=self.service.service_url) + RemoteWebDriver.__init__( self, - command_executor=self.service.service_url, + command_executor=executor, desired_capabilities=desired_capabilities) + self._is_remote = False def quit(self): @@ -66,3 +73,36 @@ finally: if not self._reuse_service: self.service.stop() + + # safaridriver extension commands. The canonical command support matrix is here: + # https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/WebDriverEndpointDoc/Commands/Commands.html + + # First available in Safari 11.1 and Safari Technology Preview 41. + def set_permission(self, permission, value): + if not isinstance(value, bool): + raise WebDriverException("Value of a session permission must be set to True or False.") + + payload = {} + payload[permission] = value + self.execute("SET_PERMISSIONS", {"permissions": payload}) + + # First available in Safari 11.1 and Safari Technology Preview 41. + def get_permission(self, permission): + payload = self.execute("GET_PERMISSIONS")["value"] + permissions = payload["permissions"] + if not permissions: + return None + + if permission not in permissions: + return None + + value = permissions[permission] + if not isinstance(value, bool): + return None + + return value + + # First available in Safari 11.1 and Safari Technology Preview 42. + def debug(self): + self.execute("ATTACH_DEBUGGER") + self.execute_script("debugger;") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium/webdriver/webkitgtk/options.py new/selenium-3.12.0/selenium/webdriver/webkitgtk/options.py --- old/selenium-3.11.0/selenium/webdriver/webkitgtk/options.py 2018-03-05 10:36:38.000000000 +0100 +++ new/selenium-3.12.0/selenium/webdriver/webkitgtk/options.py 2018-05-08 15:56:18.000000000 +0200 @@ -84,7 +84,7 @@ Creates a capabilities with all the options that have been set and returns a dictionary with everything """ - webkitgtk = DesiredCapabilities.WEBKITGTK.copy() + caps = DesiredCapabilities.WEBKITGTK.copy() browser_options = {} if self.binary_location: @@ -93,6 +93,6 @@ browser_options["args"] = self.arguments browser_options["useOverlayScrollbars"] = self.overlay_scrollbars_enabled - webkitgtk[Options.KEY] = browser_options + caps[Options.KEY] = browser_options - return webkitgtk + return caps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium.egg-info/PKG-INFO new/selenium-3.12.0/selenium.egg-info/PKG-INFO --- old/selenium-3.11.0/selenium.egg-info/PKG-INFO 2018-03-12 12:52:12.000000000 +0100 +++ new/selenium-3.12.0/selenium.egg-info/PKG-INFO 2018-05-08 16:37:44.000000000 +0200 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: selenium -Version: 3.11.0 +Version: 3.12.0 Summary: Python bindings for Selenium Home-page: https://github.com/SeleniumHQ/selenium/ Author: UNKNOWN Author-email: UNKNOWN License: Apache 2.0 -Description-Content-Type: UNKNOWN Description: ====================== Selenium Client Driver ====================== @@ -44,7 +43,7 @@ pip install -U selenium - Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-3.11.0.tar.gz), unarchive it, and run:: + Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-3.12.0.tar.gz), unarchive it, and run:: python setup.py install @@ -136,11 +135,11 @@ 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.11/selenium-server-standalone-3.11.0.jar + Download the server separately, from: http://selenium-release.storage.googleapis.com/3.12/selenium-server-standalone-3.12.0.jar Run the server from the command line:: - java -jar selenium-server-standalone-3.11.0.jar + java -jar selenium-server-standalone-3.12.0.jar Then run your Python client scripts. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/selenium.egg-info/SOURCES.txt new/selenium-3.12.0/selenium.egg-info/SOURCES.txt --- old/selenium-3.11.0/selenium.egg-info/SOURCES.txt 2018-03-12 12:52:12.000000000 +0100 +++ new/selenium-3.12.0/selenium.egg-info/SOURCES.txt 2018-05-08 16:37:44.000000000 +0200 @@ -82,6 +82,8 @@ selenium/webdriver/remote/webdriver.py selenium/webdriver/remote/webelement.py selenium/webdriver/safari/__init__.py +selenium/webdriver/safari/permissions.py +selenium/webdriver/safari/remote_connection.py selenium/webdriver/safari/service.py selenium/webdriver/safari/webdriver.py selenium/webdriver/support/__init__.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/selenium-3.11.0/setup.py new/selenium-3.12.0/setup.py --- old/selenium-3.11.0/setup.py 2018-03-12 12:46:15.000000000 +0100 +++ new/selenium-3.12.0/setup.py 2018-05-08 15:56:18.000000000 +0200 @@ -29,7 +29,7 @@ setup_args = { 'cmdclass': {'install': install}, 'name': 'selenium', - 'version': "3.11.0", + 'version': "3.12.0", 'license': 'Apache 2.0', 'description': 'Python bindings for Selenium', 'long_description': open(join(abspath(dirname(__file__)), "README.rst")).read(),
