selenium-webdriver 3.0.0.beta2.1 → 3.0.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/lib/selenium/webdriver.rb +1 -0
- data/lib/selenium/webdriver/atoms.rb +18 -0
- data/lib/selenium/webdriver/atoms/getAttribute.js +86 -0
- data/lib/selenium/webdriver/common/element.rb +1 -1
- data/lib/selenium/webdriver/remote/bridge.rb +1 -1
- data/lib/selenium/webdriver/remote/w3c_bridge.rb +7 -2
- data/selenium-webdriver.gemspec +1 -1
- metadata +4 -6
- data/lib/selenium/webdriver/firefox/extension/prefs.json +0 -69
- data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
- data/lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so +0 -0
- data/lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so +0 -0
data/CHANGES
CHANGED
data/lib/selenium/webdriver.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Selenium
|
2
|
+
module WebDriver
|
3
|
+
module Atoms
|
4
|
+
|
5
|
+
private
|
6
|
+
|
7
|
+
def read_atom(function)
|
8
|
+
File.read(File.expand_path("../atoms/#{function}.js", __FILE__))
|
9
|
+
end
|
10
|
+
|
11
|
+
def execute_atom(function_name, *arguments)
|
12
|
+
script = "return (%s).apply(null, arguments)" % read_atom(function_name)
|
13
|
+
execute_script(script, *arguments)
|
14
|
+
end
|
15
|
+
|
16
|
+
end # Atoms
|
17
|
+
end # WebDriver
|
18
|
+
end # Selenium
|
@@ -0,0 +1,86 @@
|
|
1
|
+
function(){return function(){var g=this;function aa(a,b){var c=a.split("."),d=g;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}
|
2
|
+
function ba(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
|
3
|
+
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function l(a){return"string"==typeof a}function ca(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function da(a,b,c){return a.call.apply(a.bind,arguments)}
|
4
|
+
function ea(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function ha(a,b,c){ha=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?da:ea;return ha.apply(null,arguments)}
|
5
|
+
function ia(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}function m(a,b){function c(){}c.prototype=b.prototype;a.K=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.J=function(a,c,f){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[c].apply(a,h)}};function ja(a,b){this.code=a;this.a=n[a]||ka;this.message=b||"";var c=this.a.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}m(ja,Error);var ka="unknown error",n={15:"element not selectable",11:"element not visible"};n[31]=ka;n[30]=ka;n[24]="invalid cookie domain";n[29]="invalid element coordinates";n[12]="invalid element state";
|
6
|
+
n[32]="invalid selector";n[51]="invalid selector";n[52]="invalid selector";n[17]="javascript error";n[405]="unsupported operation";n[34]="move target out of bounds";n[27]="no such alert";n[7]="no such element";n[8]="no such frame";n[23]="no such window";n[28]="script timeout";n[33]="session not created";n[10]="stale element reference";n[21]="timeout";n[25]="unable to set cookie";n[26]="unexpected alert open";n[13]=ka;n[9]="unknown command";ja.prototype.toString=function(){return this.name+": "+this.message};var la=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};
|
7
|
+
function ma(a,b){for(var c=0,d=la(String(a)).split("."),e=la(String(b)).split("."),f=Math.max(d.length,e.length),h=0;0==c&&h<f;h++){var k=d[h]||"",v=e[h]||"",B=RegExp("(\\d*)(\\D*)","g"),O=RegExp("(\\d*)(\\D*)","g");do{var fa=B.exec(k)||["","",""],ga=O.exec(v)||["","",""];if(0==fa[0].length&&0==ga[0].length)break;c=na(0==fa[1].length?0:parseInt(fa[1],10),0==ga[1].length?0:parseInt(ga[1],10))||na(0==fa[2].length,0==ga[2].length)||na(fa[2],ga[2])}while(0==c)}return c}
|
8
|
+
function na(a,b){return a<b?-1:a>b?1:0};/*
|
9
|
+
|
10
|
+
The MIT License
|
11
|
+
|
12
|
+
Copyright (c) 2007 Cybozu Labs, Inc.
|
13
|
+
Copyright (c) 2012 Google Inc.
|
14
|
+
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
16
|
+
of this software and associated documentation files (the "Software"), to
|
17
|
+
deal in the Software without restriction, including without limitation the
|
18
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
19
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
20
|
+
furnished to do so, subject to the following conditions:
|
21
|
+
|
22
|
+
The above copyright notice and this permission notice shall be included in
|
23
|
+
all copies or substantial portions of the Software.
|
24
|
+
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
26
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
27
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
28
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
29
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
30
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
31
|
+
IN THE SOFTWARE.
|
32
|
+
*/
|
33
|
+
function p(a,b,c){this.a=a;this.b=b||1;this.h=c||1};function oa(a){this.b=a;this.a=0}function pa(a){a=a.match(qa);for(var b=0;b<a.length;b++)ra.test(a[b])&&a.splice(b,1);return new oa(a)}var qa=RegExp("\\$?(?:(?![0-9-\\.])(?:\\*|[\\w-\\.]+):)?(?![0-9-\\.])(?:\\*|[\\w-\\.]+)|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),ra=/^\s/;function q(a,b){return a.b[a.a+(b||0)]}function r(a){return a.b[a.a++]}function sa(a){return a.b.length<=a.a};var t;a:{var ta=g.navigator;if(ta){var ua=ta.userAgent;if(ua){t=ua;break a}}t=""}function u(a){return-1!=t.indexOf(a)};function w(a,b){this.j=a;this.c=void 0!==b?b:null;this.b=null;switch(a){case "comment":this.b=8;break;case "text":this.b=3;break;case "processing-instruction":this.b=7;break;case "node":break;default:throw Error("Unexpected argument");}}function va(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}w.prototype.a=function(a){return null===this.b||this.b==a.nodeType};w.prototype.h=function(){return this.j};
|
34
|
+
w.prototype.toString=function(){var a="Kind Test: "+this.j;null===this.c||(a+=x(this.c));return a};function y(a,b){this.o=a.toLowerCase();var c;c="*"==this.o?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():c}y.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=void 0!==a.localName?a.localName:a.nodeName;return"*"!=this.o&&this.o!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};y.prototype.h=function(){return this.o};
|
35
|
+
y.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.o};function wa(a){switch(a.nodeType){case 1:return ia(xa,a);case 9:return wa(a.documentElement);case 11:case 10:case 6:case 12:return ya;default:return a.parentNode?wa(a.parentNode):ya}}function ya(){return null}function xa(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?xa(a.parentNode,b):null};function za(a,b){if(l(a))return l(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 z(a,b){for(var c=a.length,d=l(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function Aa(a,b){for(var c=a.length,d=[],e=0,f=l(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var k=f[h];b.call(void 0,k,h,a)&&(d[e++]=k)}return d}function A(a,b,c){var d=c;z(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}
|
36
|
+
function Ba(a,b){for(var c=a.length,d=l(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 Ca(a,b){var c;a:{c=a.length;for(var d=l(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:l(a)?a.charAt(c):a[c]}function Da(a){return Array.prototype.concat.apply(Array.prototype,arguments)}function Ea(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};function Fa(){return u("iPhone")&&!u("iPod")&&!u("iPad")};function Ga(){return u("Opera")||u("OPR")}function Ha(){return(u("Chrome")||u("CriOS"))&&!Ga()&&!u("Edge")};var Ia=Ga(),C=u("Trident")||u("MSIE"),Ja=u("Edge"),D=u("Gecko")&&!(-1!=t.toLowerCase().indexOf("webkit")&&!u("Edge"))&&!(u("Trident")||u("MSIE"))&&!u("Edge"),Ka=-1!=t.toLowerCase().indexOf("webkit")&&!u("Edge"),La=u("Macintosh"),Ma=u("Windows");function Na(){var a=t;if(D)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Ja)return/Edge\/([\d\.]+)/.exec(a);if(C)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Ka)return/WebKit\/(\S+)/.exec(a)}function Oa(){var a=g.document;return a?a.documentMode:void 0}
|
37
|
+
var Pa=function(){if(Ia&&g.opera){var a;var b=g.opera.version;try{a=b()}catch(c){a=b}return a}a="";(b=Na())&&(a=b?b[1]:"");return C&&(b=Oa(),null!=b&&b>parseFloat(a))?String(b):a}(),Qa={};function Ra(a){Qa[a]||(Qa[a]=0<=ma(Pa,a))}var Sa=g.document,E=Sa&&C?Oa()||("CSS1Compat"==Sa.compatMode?parseInt(Pa,10):5):void 0;!D&&!C||C&&9<=Number(E)||D&&Ra("1.9.1");C&&Ra("9");function F(a,b){this.u={};this.l=[];this.b=this.a=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)G(this,arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof F)for(d=Ta(a),Ua(a),e=[],c=0;c<a.l.length;c++)e.push(a.u[a.l[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)G(this,d[c],e[c])}}function Ta(a){Ua(a);return a.l.concat()}
|
38
|
+
F.prototype.clear=function(){this.u={};this.b=this.a=this.l.length=0};function Ua(a){if(a.a!=a.l.length){for(var b=0,c=0;b<a.l.length;){var d=a.l[b];Object.prototype.hasOwnProperty.call(a.u,d)&&(a.l[c++]=d);b++}a.l.length=c}if(a.a!=a.l.length){for(var e={},c=b=0;b<a.l.length;)d=a.l[b],Object.prototype.hasOwnProperty.call(e,d)||(a.l[c++]=d,e[d]=1),b++;a.l.length=c}}F.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.u,a)?this.u[a]:b};
|
39
|
+
function G(a,b,c){Object.prototype.hasOwnProperty.call(a.u,b)||(a.a++,a.l.push(b),a.b++);a.u[b]=c}F.prototype.forEach=function(a,b){for(var c=Ta(this),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};F.prototype.clone=function(){return new F(this)};var Va=u("Firefox"),Wa=Fa()||u("iPod"),Xa=u("iPad"),H=u("Android")&&!(Ha()||u("Firefox")||Ga()||u("Silk")),Ya=Ha(),Za=u("Safari")&&!(Ha()||u("Coast")||Ga()||u("Edge")||u("Silk")||u("Android"))&&!(Fa()||u("iPad")||u("iPod"));var I=C&&!(9<=Number(E)),$a=C&&!(8<=Number(E));function ab(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}
|
40
|
+
function bb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(C&&!(9<=Number(E))){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?cb(a,b):!c&&ab(e,b)?-1*db(a,b):!d&&ab(f,a)?db(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?
|
41
|
+
a:a.ownerDocument||a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(g.Range.START_TO_END,d)}function db(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return cb(d,a)}function cb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}var eb={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},fb={IMG:" ",BR:"\n"};
|
42
|
+
function gb(a,b,c){if(!(a.nodeName in eb))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in fb)b.push(fb[a.nodeName]);else for(a=a.firstChild;a;)gb(a,b,c),a=a.nextSibling};function hb(a){return(a=a.exec(t))?a[1]:""}var ib=function(){if(Va)return hb(/Firefox\/([0-9.]+)/);if(C||Ja||Ia)return Pa;if(Ya)return hb(/Chrome\/([0-9.]+)/);if(Za&&!(Fa()||u("iPad")||u("iPod")))return hb(/Version\/([0-9.]+)/);if(Wa||Xa){var a;if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t))return a[1]+"."+a[2]}else if(H)return(a=hb(/Android\s+([0-9.]+)/))?a:hb(/Version\/([0-9.]+)/);return""}();function jb(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function kb(a,b){var c=$a&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new jb(b,a,b.nodeName,c)};var lb,mb;function nb(a){ob?mb(a):H?ma(pb,a):ma(ib,a)}var ob=function(){if(!D)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(f){return!1}var b=a.classes,a=a.interfaces,c=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),d=b.platformVersion,e=b.version;lb=function(a){c.compare(d,""+a)};mb=function(a){c.compare(e,""+a)};return!0}(),qb;
|
43
|
+
if(H){var rb=/Android\s+([0-9\.]+)/.exec(t);qb=rb?rb[1]:"0"}else qb="0";var pb=qb,sb=C&&!(8<=Number(E)),tb=C&&!(9<=Number(E));H&&nb(2.3);H&&nb(4);Za&&nb(6);function J(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(I&&"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),I&&"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}
|
44
|
+
function K(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}$a&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function ub(a,b,c,d,e){return(I?vb:wb).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new L)}
|
45
|
+
function vb(a,b,c,d,e){if(a instanceof y||8==a.b||c&&null===a.b){var f=b.all;if(!f)return e;a=xb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],k=0;b=f[k++];)K(b,c,d)&&h.push(b);f=h}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||M(e,b);return e}yb(a,b,c,d,e);return e}
|
46
|
+
function wb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!C?(b=b.getElementsByName(d),z(b,function(b){a.a(b)&&M(e,b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),z(b,function(b){b.className==d&&a.a(b)&&M(e,b)})):a instanceof w?yb(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.h()),z(b,function(a){K(a,c,d)&&M(e,a)}));return e}
|
47
|
+
function zb(a,b,c,d,e){var f;if((a instanceof y||8==a.b||c&&null===a.b)&&(f=b.childNodes)){var h=xb(a);if("*"!=h&&(f=Aa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==h}),!f))return e;c&&(f=Aa(f,function(a){return K(a,c,d)}));z(f,function(a){"*"==h&&("!"==a.tagName||"*"==h&&1!=a.nodeType)||M(e,a)});return e}return Ab(a,b,c,d,e)}function Ab(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)K(b,c,d)&&a.a(b)&&M(e,b);return e}
|
48
|
+
function yb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)K(b,c,d)&&a.a(b)&&M(e,b),yb(a,b,c,d,e)}function xb(a){if(a instanceof w){if(8==a.b)return"!";if(null===a.b)return"*"}return a.h()};C&&(ob?lb(10):C?ma(E,10):Ra(10));H&&nb(4);function L(){this.b=this.a=null;this.s=0}function Bb(a){this.node=a;this.a=this.b=null}function Cb(a,b){if(!a.a)return b;if(!b.a)return a;for(var c=a.a,d=b.a,e=null,f=null,h=0;c&&d;){var f=c.node,k=d.node;f==k||f instanceof jb&&k instanceof jb&&f.a==k.a?(f=c,c=c.a,d=d.a):0<bb(c.node,d.node)?(f=d,d=d.a):(f=c,c=c.a);(f.b=e)?e.a=f:a.a=f;e=f;h++}for(f=c||d;f;)f.b=e,e=e.a=f,h++,f=f.a;a.b=e;a.s=h;return a}
|
49
|
+
L.prototype.unshift=function(a){a=new Bb(a);a.a=this.a;this.b?this.a.b=a:this.a=this.b=a;this.a=a;this.s++};function M(a,b){var c=new Bb(b);c.b=a.b;a.a?a.b.a=c:a.a=a.b=c;a.b=c;a.s++}function Db(a){return(a=a.a)?a.node:null}function Eb(a){return(a=Db(a))?J(a):""}function N(a,b){return new Fb(a,!!b)}function Fb(a,b){this.h=a;this.b=(this.c=b)?a.b:a.a;this.a=null}function P(a){var b=a.b;if(null==b)return null;var c=a.a=b;a.b=a.c?b.b:b.a;return c.node};function Q(a){this.m=a;this.b=this.i=!1;this.h=null}function x(a){return"\n "+a.toString().split("\n").join("\n ")}function Gb(a,b){a.i=b}function Hb(a,b){a.b=b}function R(a,b){var c=a.a(b);return c instanceof L?+Eb(c):+c}function S(a,b){var c=a.a(b);return c instanceof L?Eb(c):""+c}function Ib(a,b){var c=a.a(b);return c instanceof L?!!c.s:!!c};function Jb(a,b,c){Q.call(this,a.m);this.c=a;this.j=b;this.w=c;this.i=b.i||c.i;this.b=b.b||c.b;this.c==Kb&&(c.b||c.i||4==c.m||0==c.m||!b.h?b.b||b.i||4==b.m||0==b.m||!c.h||(this.h={name:c.h.name,A:b}):this.h={name:b.h.name,A:c})}m(Jb,Q);
|
50
|
+
function Lb(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof L&&c instanceof L){b=N(b);for(d=P(b);d;d=P(b))for(e=N(c),f=P(e);f;f=P(e))if(a(J(d),J(f)))return!0;return!1}if(b instanceof L||c instanceof L){b instanceof L?(e=b,d=c):(e=c,d=b);f=N(e);for(var h=typeof d,k=P(f);k;k=P(f)){switch(h){case "number":k=+J(k);break;case "boolean":k=!!J(k);break;case "string":k=J(k);break;default:throw Error("Illegal primitive type for comparison.");}if(e==b&&a(k,d)||e==c&&a(d,k))return!0}return!1}return e?"boolean"==
|
51
|
+
typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}Jb.prototype.a=function(a){return this.c.v(this.j,this.w,a)};Jb.prototype.toString=function(){var a="Binary Expression: "+this.c,a=a+x(this.j);return a+=x(this.w)};function Mb(a,b,c,d){this.a=a;this.D=b;this.m=c;this.v=d}Mb.prototype.toString=function(){return this.a};var Nb={};
|
52
|
+
function T(a,b,c,d){if(Nb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Mb(a,b,c,d);return Nb[a.toString()]=a}T("div",6,1,function(a,b,c){return R(a,c)/R(b,c)});T("mod",6,1,function(a,b,c){return R(a,c)%R(b,c)});T("*",6,1,function(a,b,c){return R(a,c)*R(b,c)});T("+",5,1,function(a,b,c){return R(a,c)+R(b,c)});T("-",5,1,function(a,b,c){return R(a,c)-R(b,c)});T("<",4,2,function(a,b,c){return Lb(function(a,b){return a<b},a,b,c)});
|
53
|
+
T(">",4,2,function(a,b,c){return Lb(function(a,b){return a>b},a,b,c)});T("<=",4,2,function(a,b,c){return Lb(function(a,b){return a<=b},a,b,c)});T(">=",4,2,function(a,b,c){return Lb(function(a,b){return a>=b},a,b,c)});var Kb=T("=",3,2,function(a,b,c){return Lb(function(a,b){return a==b},a,b,c,!0)});T("!=",3,2,function(a,b,c){return Lb(function(a,b){return a!=b},a,b,c,!0)});T("and",2,2,function(a,b,c){return Ib(a,c)&&Ib(b,c)});T("or",1,2,function(a,b,c){return Ib(a,c)||Ib(b,c)});function Ob(a,b){if(b.a.length&&4!=a.m)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");Q.call(this,a.m);this.c=a;this.j=b;this.i=a.i;this.b=a.b}m(Ob,Q);Ob.prototype.a=function(a){a=this.c.a(a);return Pb(this.j,a)};Ob.prototype.toString=function(){var a;a="Filter:"+x(this.c);return a+=x(this.j)};function Qb(a,b){if(b.length<a.F)throw Error("Function "+a.o+" expects at least"+a.F+" arguments, "+b.length+" given");if(null!==a.C&&b.length>a.C)throw Error("Function "+a.o+" expects at most "+a.C+" arguments, "+b.length+" given");a.G&&z(b,function(b,d){if(4!=b.m)throw Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b);});Q.call(this,a.m);this.j=a;this.c=b;Gb(this,a.i||Ba(b,function(a){return a.i}));Hb(this,a.I&&!b.length||a.H&&!!b.length||Ba(b,function(a){return a.b}))}
|
54
|
+
m(Qb,Q);Qb.prototype.a=function(a){return this.j.v.apply(null,Da(a,this.c))};Qb.prototype.toString=function(){var a="Function: "+this.j;if(this.c.length)var b=A(this.c,function(a,b){return a+x(b)},"Arguments:"),a=a+x(b);return a};function Rb(a,b,c,d,e,f,h,k,v){this.o=a;this.m=b;this.i=c;this.I=d;this.H=e;this.v=f;this.F=h;this.C=void 0!==k?k:h;this.G=!!v}Rb.prototype.toString=function(){return this.o};var Sb={};
|
55
|
+
function U(a,b,c,d,e,f,h,k){if(Sb.hasOwnProperty(a))throw Error("Function already created: "+a+".");Sb[a]=new Rb(a,b,c,d,!1,e,f,h,k)}U("boolean",2,!1,!1,function(a,b){return Ib(b,a)},1);U("ceiling",1,!1,!1,function(a,b){return Math.ceil(R(b,a))},1);U("concat",3,!1,!1,function(a,b){return A(Ea(arguments,1),function(b,d){return b+S(d,a)},"")},2,null);U("contains",2,!1,!1,function(a,b,c){b=S(b,a);a=S(c,a);return-1!=b.indexOf(a)},2);U("count",1,!1,!1,function(a,b){return b.a(a).s},1,1,!0);
|
56
|
+
U("false",2,!1,!1,function(){return!1},0);U("floor",1,!1,!1,function(a,b){return Math.floor(R(b,a))},1);U("id",4,!1,!1,function(a,b){function c(a){if(I){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return Ca(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument,d=S(b,a).split(/\s+/),f=[];z(d,function(a){a=c(a);!a||0<=za(f,a)||f.push(a)});f.sort(bb);var h=new L;z(f,function(a){M(h,a)});return h},1);
|
57
|
+
U("lang",2,!1,!1,function(){return!1},1);U("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.h},0);U("local-name",3,!1,!0,function(a,b){var c=b?Db(b.a(a)):a.a;return c?c.localName||c.nodeName.toLowerCase():""},0,1,!0);U("name",3,!1,!0,function(a,b){var c=b?Db(b.a(a)):a.a;return c?c.nodeName.toLowerCase():""},0,1,!0);U("namespace-uri",3,!0,!1,function(){return""},0,1,!0);
|
58
|
+
U("normalize-space",3,!1,!0,function(a,b){return(b?S(b,a):J(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);U("not",2,!1,!1,function(a,b){return!Ib(b,a)},1);U("number",1,!1,!0,function(a,b){return b?R(b,a):+J(a.a)},0,1);U("position",1,!0,!1,function(a){return a.b},0);U("round",1,!1,!1,function(a,b){return Math.round(R(b,a))},1);U("starts-with",2,!1,!1,function(a,b,c){b=S(b,a);a=S(c,a);return 0==b.lastIndexOf(a,0)},2);U("string",3,!1,!0,function(a,b){return b?S(b,a):J(a.a)},0,1);
|
59
|
+
U("string-length",1,!1,!0,function(a,b){return(b?S(b,a):J(a.a)).length},0,1);U("substring",3,!1,!1,function(a,b,c,d){c=R(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?R(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=S(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);U("substring-after",3,!1,!1,function(a,b,c){b=S(b,a);a=S(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
|
60
|
+
U("substring-before",3,!1,!1,function(a,b,c){b=S(b,a);a=S(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);U("sum",1,!1,!1,function(a,b){for(var c=N(b.a(a)),d=0,e=P(c);e;e=P(c))d+=+J(e);return d},1,1,!0);U("translate",3,!1,!1,function(a,b,c,d){b=S(b,a);c=S(c,a);var e=S(d,a);a={};for(d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);U("true",2,!1,!1,function(){return!0},0);function Tb(a){Q.call(this,3);this.c=a.substring(1,a.length-1)}m(Tb,Q);Tb.prototype.a=function(){return this.c};Tb.prototype.toString=function(){return"Literal: "+this.c};function Ub(a){Q.call(this,1);this.c=a}m(Ub,Q);Ub.prototype.a=function(){return this.c};Ub.prototype.toString=function(){return"Number: "+this.c};function Vb(a,b){Q.call(this,a.m);this.j=a;this.c=b;this.i=a.i;this.b=a.b;if(1==this.c.length){var c=this.c[0];c.B||c.c!=Wb||(c=c.w,"*"!=c.h()&&(this.h={name:c.h(),A:null}))}}m(Vb,Q);function Xb(){Q.call(this,4)}m(Xb,Q);Xb.prototype.a=function(a){var b=new L;a=a.a;9==a.nodeType?M(b,a):M(b,a.ownerDocument);return b};Xb.prototype.toString=function(){return"Root Helper Expression"};function Yb(){Q.call(this,4)}m(Yb,Q);Yb.prototype.a=function(a){var b=new L;M(b,a.a);return b};Yb.prototype.toString=function(){return"Context Helper Expression"};
|
61
|
+
function Zb(a){return"/"==a||"//"==a}Vb.prototype.a=function(a){var b=this.j.a(a);if(!(b instanceof L))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;c<d&&b.s;c++){var e=a[c],f=N(b,e.c.a),h;if(e.i||e.c!=$b)if(e.i||e.c!=ac)for(h=P(f),b=e.a(new p(h));null!=(h=P(f));)h=e.a(new p(h)),b=Cb(b,h);else h=P(f),b=e.a(new p(h));else{for(h=P(f);(b=P(f))&&(!h.contains||h.contains(b))&&b.compareDocumentPosition(h)&8;h=b);b=e.a(new p(h))}}return b};
|
62
|
+
Vb.prototype.toString=function(){var a;a="Path Expression:"+x(this.j);if(this.c.length){var b=A(this.c,function(a,b){return a+x(b)},"Steps:");a+=x(b)}return a};function bc(a,b){this.a=a;this.b=!!b}
|
63
|
+
function Pb(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=N(b),f=b.s,h,k=0;h=P(e);k++){var v=a.b?f-k:k+1;h=d.a(new p(h,v,f));if("number"==typeof h)v=v==h;else if("string"==typeof h||"boolean"==typeof h)v=!!h;else if(h instanceof L)v=0<h.s;else throw Error("Predicate.evaluate returned an unexpected type.");if(!v){v=e;h=v.h;var B=v.a;if(!B)throw Error("Next must be called at least once before remove.");var O=B.b,B=B.a;O?O.a=B:h.a=B;B?B.b=O:h.b=O;h.s--;v.a=null}}return b}
|
64
|
+
bc.prototype.toString=function(){return A(this.a,function(a,b){return a+x(b)},"Predicates:")};function cc(a){Q.call(this,1);this.c=a;this.i=a.i;this.b=a.b}m(cc,Q);cc.prototype.a=function(a){return-R(this.c,a)};cc.prototype.toString=function(){return"Unary Expression: -"+x(this.c)};function dc(a){Q.call(this,4);this.c=a;Gb(this,Ba(this.c,function(a){return a.i}));Hb(this,Ba(this.c,function(a){return a.b}))}m(dc,Q);dc.prototype.a=function(a){var b=new L;z(this.c,function(c){c=c.a(a);if(!(c instanceof L))throw Error("Path expression must evaluate to NodeSet.");b=Cb(b,c)});return b};dc.prototype.toString=function(){return A(this.c,function(a,b){return a+x(b)},"Union Expression:")};function V(a,b,c,d){Q.call(this,4);this.c=a;this.w=b;this.j=c||new bc([]);this.B=!!d;b=this.j;b=0<b.a.length?b.a[0].h:null;a.b&&b&&(a=b.name,a=I?a.toLowerCase():a,this.h={name:a,A:b.A});a:{a=this.j;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.i||1==c.m||0==c.m){a=!0;break a}a=!1}this.i=a}m(V,Q);
|
65
|
+
V.prototype.a=function(a){var b=a.a,c=null,c=this.h,d=null,e=null,f=0;c&&(d=c.name,e=c.A?S(c.A,a):null,f=1);if(this.B)if(this.i||this.c!=ec)if(a=N((new V(fc,new w("node"))).a(a)),b=P(a))for(c=this.v(b,d,e,f);null!=(b=P(a));)c=Cb(c,this.v(b,d,e,f));else c=new L;else c=ub(this.w,b,d,e),c=Pb(this.j,c,f);else c=this.v(a.a,d,e,f);return c};V.prototype.v=function(a,b,c,d){a=this.c.h(this.w,a,b,c);return a=Pb(this.j,a,d)};
|
66
|
+
V.prototype.toString=function(){var a;a="Step:"+x("Operator: "+(this.B?"//":"/"));this.c.o&&(a+=x("Axis: "+this.c));a+=x(this.w);if(this.j.a.length){var b=A(this.j.a,function(a,b){return a+x(b)},"Predicates:");a+=x(b)}return a};function gc(a,b,c,d){this.o=a;this.h=b;this.a=c;this.b=d}gc.prototype.toString=function(){return this.o};var hc={};function W(a,b,c,d){if(hc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new gc(a,b,c,!!d);return hc[a]=b}
|
67
|
+
W("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.a(d)&&c.unshift(d);return c},!0);W("ancestor-or-self",function(a,b){var c=new L,d=b;do a.a(d)&&c.unshift(d);while(d=d.parentNode);return c},!0);
|
68
|
+
var Wb=W("attribute",function(a,b){var c=new L,d=a.h();if("style"==d&&I&&b.style)return M(c,new jb(b.style,b,"style",b.style.cssText)),c;var e=b.attributes;if(e)if(a instanceof w&&null===a.b||"*"==d)for(var d=0,f;f=e[d];d++)I?f.nodeValue&&M(c,kb(b,f)):M(c,f);else(f=e.getNamedItem(d))&&(I?f.nodeValue&&M(c,kb(b,f)):M(c,f));return c},!1),ec=W("child",function(a,b,c,d,e){return(I?zb:Ab).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new L)},!1,!0);W("descendant",ub,!1,!0);
|
69
|
+
var fc=W("descendant-or-self",function(a,b,c,d){var e=new L;K(b,c,d)&&a.a(b)&&M(e,b);return ub(a,b,c,d,e)},!1,!0),$b=W("following",function(a,b,c,d){var e=new L;do for(var f=b;f=f.nextSibling;)K(f,c,d)&&a.a(f)&&M(e,f),e=ub(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);W("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.a(d)&&M(c,d);return c},!1);W("namespace",function(){return new L},!1);
|
70
|
+
var ic=W("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return M(c,b.ownerElement),c;var d=b.parentNode;a.a(d)&&M(c,d);return c},!1),ac=W("preceding",function(a,b,c,d){var e=new L,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,k=f.length;h<k;h++){var v=[];for(b=f[h];b=b.previousSibling;)v.unshift(b);for(var B=0,O=v.length;B<O;B++)b=v[B],K(b,c,d)&&a.a(b)&&M(e,b),e=ub(a,b,c,d,e)}return e},!0,!0);
|
71
|
+
W("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.a(d)&&c.unshift(d);return c},!0);var jc=W("self",function(a,b){var c=new L;a.a(b)&&M(c,b);return c},!1);function kc(a,b){this.a=a;this.b=b}function lc(a){for(var b,c=[];;){X(a,"Missing right hand side of binary expression.");b=mc(a);var d=r(a.a);if(!d)break;var e=(d=Nb[d]||null)&&d.D;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].D;)b=new Jb(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new Jb(c.pop(),c.pop(),b);return b}function X(a,b){if(sa(a.a))throw Error(b);}function nc(a,b){var c=r(a.a);if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);}
|
72
|
+
function oc(a){a=r(a.a);if(")"!=a)throw Error("Bad token: "+a);}function pc(a){a=r(a.a);if(2>a.length)throw Error("Unclosed literal string");return new Tb(a)}
|
73
|
+
function qc(a){var b,c=[],d;if(Zb(q(a.a))){b=r(a.a);d=q(a.a);if("/"==b&&(sa(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Xb;d=new Xb;X(a,"Missing next location step.");b=rc(a,b);c.push(b)}else{a:{b=q(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":r(a.a);b=lc(a);X(a,'unclosed "("');nc(a,")");break;case '"':case "'":b=pc(a);break;default:if(isNaN(+b))if(!va(b)&&/(?![0-9])[\w]/.test(d)&&"("==q(a.a,1)){b=r(a.a);
|
74
|
+
b=Sb[b]||null;r(a.a);for(d=[];")"!=q(a.a);){X(a,"Missing function argument list.");d.push(lc(a));if(","!=q(a.a))break;r(a.a)}X(a,"Unclosed function argument list.");oc(a);b=new Qb(b,d)}else{b=null;break a}else b=new Ub(+r(a.a))}"["==q(a.a)&&(d=new bc(sc(a)),b=new Ob(b,d))}if(b)if(Zb(q(a.a)))d=b;else return b;else b=rc(a,"/"),d=new Yb,c.push(b)}for(;Zb(q(a.a));)b=r(a.a),X(a,"Missing next location step."),b=rc(a,b),c.push(b);return new Vb(d,c)}
|
75
|
+
function rc(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==q(a.a))return d=new V(jc,new w("node")),r(a.a),d;if(".."==q(a.a))return d=new V(ic,new w("node")),r(a.a),d;var f;if("@"==q(a.a))f=Wb,r(a.a),X(a,"Missing attribute name");else if("::"==q(a.a,1)){if(!/(?![0-9])[\w]/.test(q(a.a).charAt(0)))throw Error("Bad token: "+r(a.a));c=r(a.a);f=hc[c]||null;if(!f)throw Error("No axis with name: "+c);r(a.a);X(a,"Missing node name")}else f=ec;c=q(a.a);if(/(?![0-9])[\w\*]/.test(c.charAt(0)))if("("==
|
76
|
+
q(a.a,1)){if(!va(c))throw Error("Invalid node type: "+c);c=r(a.a);if(!va(c))throw Error("Invalid type name: "+c);nc(a,"(");X(a,"Bad nodetype");e=q(a.a).charAt(0);var h=null;if('"'==e||"'"==e)h=pc(a);X(a,"Bad nodetype");oc(a);c=new w(c,h)}else if(c=r(a.a),e=c.indexOf(":"),-1==e)c=new y(c);else{var h=c.substring(0,e),k;if("*"==h)k="*";else if(k=a.b(h),!k)throw Error("Namespace prefix not declared: "+h);c=c.substr(e+1);c=new y(c,k)}else throw Error("Bad token: "+r(a.a));e=new bc(sc(a),f.a);return d||
|
77
|
+
new V(f,c,e,"//"==b)}function sc(a){for(var b=[];"["==q(a.a);){r(a.a);X(a,"Missing predicate expression.");var c=lc(a);b.push(c);X(a,"Unclosed predicate expression.");nc(a,"]")}return b}function mc(a){if("-"==q(a.a))return r(a.a),new cc(mc(a));var b=qc(a);if("|"!=q(a.a))a=b;else{for(b=[b];"|"==r(a.a);)X(a,"Missing next union location path."),b.push(qc(a));a.a.a--;a=new dc(b)}return a};function tc(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=pa(a);if(sa(c))throw Error("Invalid XPath expression.");b?"function"==ba(b)||(b=ha(b.lookupNamespaceURI,b)):b=function(){return null};var d=lc(new kc(c,b));if(!sa(c))throw Error("Bad token: "+r(c));this.evaluate=function(a,b){var c=d.a(new p(a));return new Y(c,b)}}
|
78
|
+
function Y(a,b){if(0==b)if(a instanceof L)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof L))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof L?Eb(a):""+a;break;case 1:this.numberValue=a instanceof L?+Eb(a):+a;break;case 3:this.booleanValue=a instanceof L?0<a.s:!!a;break;case 4:case 5:case 6:case 7:var d=
|
79
|
+
N(a);c=[];for(var e=P(d);e;e=P(d))c.push(e instanceof jb?e.a:e);this.snapshotLength=a.s;this.invalidIteratorState=!1;break;case 8:case 9:d=Db(a);this.singleNodeValue=d instanceof jb?d.a:d;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>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=c.length||
|
80
|
+
0>a?null:c[a]}}Y.ANY_TYPE=0;Y.NUMBER_TYPE=1;Y.STRING_TYPE=2;Y.BOOLEAN_TYPE=3;Y.UNORDERED_NODE_ITERATOR_TYPE=4;Y.ORDERED_NODE_ITERATOR_TYPE=5;Y.UNORDERED_NODE_SNAPSHOT_TYPE=6;Y.ORDERED_NODE_SNAPSHOT_TYPE=7;Y.ANY_UNORDERED_NODE_TYPE=8;Y.FIRST_ORDERED_NODE_TYPE=9;function uc(a){this.lookupNamespaceURI=wa(a)}
|
81
|
+
aa("wgxpath.install",function(a,b){var c=a||g,d=c.Document&&c.Document.prototype||c.document;if(!d.evaluate||b)c.XPathResult=Y,d.evaluate=function(a,b,c,d){return(new tc(a,c)).evaluate(b,d)},d.createExpression=function(a,b){return new tc(a,b)},d.createNSResolver=function(a){return new uc(a)}});function vc(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function wc(a){return vc(a,"OPTION")?!0:vc(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1}function xc(a,b){var c;if(c=sb&&"value"==b&&vc(a,"OPTION"))c=null===yc(a,"value");c?(c=[],gb(a,c,!1),c=c.join("")):c=a[b];return c}var zc=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
|
82
|
+
function Ac(a){var b=[];z(a.split(zc),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");return b=";"==b.charAt(b.length-1)?b:b+";"}function yc(a,b){b=b.toLowerCase();if("style"==b)return Ac(a.style.cssText);if(sb&&"value"==b&&vc(a,"INPUT"))return a.value;if(tb&&!0===a[b])return String(a.getAttribute(b));var c=a.getAttributeNode(b);return c&&c.specified?c.value:null};Ka||ob&&nb(3.6);var Bc={};function Z(a,b,c){ca(a)&&(a=D?a.f:a.g);a=new Cc(a);!b||b in Bc&&!c||(Bc[b]={key:a,shift:!1},c&&(Bc[c]={key:a,shift:!0}));return a}function Cc(a){this.code=a}Z(8);Z(9);Z(13);var Dc=Z(16),Ec=Z(17),Fc=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","(");Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");
|
83
|
+
Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var Gc=Z(Ma?{f:91,g:91}:La?{f:224,g:91}:{f:0,g:91});Z(Ma?{f:92,g:92}:La?{f:224,g:93}:{f:0,g:92});Z(Ma?{f:93,g:93}:La?{f:0,g:0}:{f:93,g:null});Z({f:96,g:96},"0");Z({f:97,g:97},"1");
|
84
|
+
Z({f:98,g:98},"2");Z({f:99,g:99},"3");Z({f:100,g:100},"4");Z({f:101,g:101},"5");Z({f:102,g:102},"6");Z({f:103,g:103},"7");Z({f:104,g:104},"8");Z({f:105,g:105},"9");Z({f:106,g:106},"*");Z({f:107,g:107},"+");Z({f:109,g:109},"-");Z({f:110,g:110},".");Z({f:111,g:111},"/");Z(144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({f:107,g:187},"=","+");Z(108,",");Z({f:109,g:189},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");
|
85
|
+
Z(220,"\\","|");Z(221,"]","}");Z({f:59,g:186},";",":");Z(222,"'",'"');var Hc=new F;G(Hc,1,Dc);G(Hc,2,Ec);G(Hc,4,Fc);G(Hc,8,Gc);(function(a){var b=new F;z(Ta(a),function(c){G(b,a.get(c).code,c)});return b})(Hc);D&&(ob?lb(12):C?ma(E,12):Ra(12));var Ic={"class":"className",readonly:"readOnly"},Jc="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(" ");aa("_",function(a,b){var c=null,d=b.toLowerCase();if("style"==d)return(c=a.style)&&!l(c)&&(c=c.cssText),c;if(("selected"==d||"checked"==d)&&wc(a)){if(!wc(a))throw new ja(15,"Element is not selectable");c="selected";d=a.type&&a.type.toLowerCase();if("checkbox"==d||"radio"==d)c="checked";return xc(a,c)?"true":null}var e=vc(a,"A");if(vc(a,"IMG")&&"src"==d||e&&"href"==d)return(c=yc(a,d))&&(c=xc(a,d)),c;if("spellcheck"==d){c=yc(a,d);if(null!==c){if("false"==c.toLowerCase())return"false";if("true"==c.toLowerCase())return"true"}return xc(a,
|
86
|
+
d)+""}e=Ic[b]||b;if(0<=za(Jc,d))return(c=null!==yc(a,b)||xc(a,e))?"true":null;var f;try{f=xc(a,e)}catch(h){}null==f||ca(f)?c=yc(a,b):c=f;return null!=c?c.toString():null});; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null,document:typeof window!='undefined'?window.document:null}, arguments);}
|
@@ -30,6 +30,7 @@ module Selenium
|
|
30
30
|
|
31
31
|
class W3CBridge
|
32
32
|
include BridgeHelper
|
33
|
+
include Atoms
|
33
34
|
|
34
35
|
# TODO: constant shouldn't be modified in class
|
35
36
|
COMMANDS = {}
|
@@ -519,11 +520,15 @@ module Selenium
|
|
519
520
|
end
|
520
521
|
|
521
522
|
def element_attribute(element, name)
|
522
|
-
|
523
|
+
execute_atom :getAttribute, element, name
|
524
|
+
end
|
525
|
+
|
526
|
+
def element_property(element, name)
|
527
|
+
execute :getElementProperty, id: element.values.first, name: name
|
523
528
|
end
|
524
529
|
|
525
530
|
def element_value(element)
|
526
|
-
|
531
|
+
element_property element, 'value'
|
527
532
|
end
|
528
533
|
|
529
534
|
def element_text(element)
|
data/selenium-webdriver.gemspec
CHANGED
@@ -5,7 +5,7 @@ raise "cwd must be #{root} when reading gemspec" if root != Dir.pwd
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = 'selenium-webdriver'
|
8
|
-
s.version = '3.0.0.
|
8
|
+
s.version = '3.0.0.beta3'
|
9
9
|
|
10
10
|
s.authors = ['Alex Rodionov', 'Titus Fortner']
|
11
11
|
s.email = ['p0deje@gmail.com', 'titusfortner@gmail.com']
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: selenium-webdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 6
|
5
|
-
version: 3.0.0.
|
5
|
+
version: 3.0.0.beta3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Alex Rodionov
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2016-
|
14
|
+
date: 2016-09-01 00:00:00 -05:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- lib/selenium-webdriver.rb
|
131
131
|
- lib/selenium/server.rb
|
132
132
|
- lib/selenium/webdriver.rb
|
133
|
+
- lib/selenium/webdriver/atoms.rb
|
133
134
|
- lib/selenium/webdriver/chrome.rb
|
134
135
|
- lib/selenium/webdriver/common.rb
|
135
136
|
- lib/selenium/webdriver/edge.rb
|
@@ -139,6 +140,7 @@ files:
|
|
139
140
|
- lib/selenium/webdriver/remote.rb
|
140
141
|
- lib/selenium/webdriver/safari.rb
|
141
142
|
- lib/selenium/webdriver/support.rb
|
143
|
+
- lib/selenium/webdriver/atoms/getAttribute.js
|
142
144
|
- lib/selenium/webdriver/chrome/bridge.rb
|
143
145
|
- lib/selenium/webdriver/chrome/profile.rb
|
144
146
|
- lib/selenium/webdriver/chrome/service.rb
|
@@ -197,10 +199,6 @@ files:
|
|
197
199
|
- lib/selenium/webdriver/firefox/service.rb
|
198
200
|
- lib/selenium/webdriver/firefox/util.rb
|
199
201
|
- lib/selenium/webdriver/firefox/w3c_bridge.rb
|
200
|
-
- lib/selenium/webdriver/firefox/extension/prefs.json
|
201
|
-
- lib/selenium/webdriver/firefox/extension/webdriver.xpi
|
202
|
-
- lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so
|
203
|
-
- lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so
|
204
202
|
- lib/selenium/webdriver/ie/bridge.rb
|
205
203
|
- lib/selenium/webdriver/ie/service.rb
|
206
204
|
- lib/selenium/webdriver/phantomjs/bridge.rb
|
@@ -1,69 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"frozen": {
|
3
|
-
"app.update.auto": false,
|
4
|
-
"app.update.enabled": false,
|
5
|
-
"browser.displayedE10SNotice": 4,
|
6
|
-
"browser.download.manager.showWhenStarting": false,
|
7
|
-
"browser.EULA.override": true,
|
8
|
-
"browser.EULA.3.accepted": true,
|
9
|
-
"browser.link.open_external": 2,
|
10
|
-
"browser.link.open_newwindow": 2,
|
11
|
-
"browser.offline": false,
|
12
|
-
"browser.reader.detectedFirstArticle": true,
|
13
|
-
"browser.safebrowsing.enabled": false,
|
14
|
-
"browser.safebrowsing.malware.enabled": false,
|
15
|
-
"browser.search.update": false,
|
16
|
-
"browser.selfsupport.url" : "",
|
17
|
-
"browser.sessionstore.resume_from_crash": false,
|
18
|
-
"browser.shell.checkDefaultBrowser": false,
|
19
|
-
"browser.tabs.warnOnClose": false,
|
20
|
-
"browser.tabs.warnOnOpen": false,
|
21
|
-
"datareporting.healthreport.service.enabled": false,
|
22
|
-
"datareporting.healthreport.uploadEnabled": false,
|
23
|
-
"datareporting.healthreport.service.firstRun": false,
|
24
|
-
"datareporting.healthreport.logging.consoleEnabled": false,
|
25
|
-
"datareporting.policy.dataSubmissionEnabled": false,
|
26
|
-
"datareporting.policy.dataSubmissionPolicyAccepted": false,
|
27
|
-
"devtools.errorconsole.enabled": true,
|
28
|
-
"dom.disable_open_during_load": false,
|
29
|
-
"extensions.autoDisableScopes": 10,
|
30
|
-
"extensions.blocklist.enabled": false,
|
31
|
-
"extensions.checkCompatibility.nightly": false,
|
32
|
-
"extensions.logging.enabled": true,
|
33
|
-
"extensions.update.enabled": false,
|
34
|
-
"extensions.update.notifyUser": false,
|
35
|
-
"javascript.enabled": true,
|
36
|
-
"network.manage-offline-status": false,
|
37
|
-
"network.http.phishy-userpass-length": 255,
|
38
|
-
"offline-apps.allow_by_default": true,
|
39
|
-
"prompts.tab_modal.enabled": false,
|
40
|
-
"security.csp.enable": false,
|
41
|
-
"security.fileuri.origin_policy": 3,
|
42
|
-
"security.fileuri.strict_origin_policy": false,
|
43
|
-
"signon.rememberSignons": false,
|
44
|
-
"toolkit.networkmanager.disable": true,
|
45
|
-
"toolkit.telemetry.prompted": 2,
|
46
|
-
"toolkit.telemetry.enabled": false,
|
47
|
-
"toolkit.telemetry.rejected": true,
|
48
|
-
"xpinstall.signatures.required": false,
|
49
|
-
"xpinstall.whitelist.required": false
|
50
|
-
},
|
51
|
-
"mutable": {
|
52
|
-
"browser.dom.window.dump.enabled": true,
|
53
|
-
"browser.laterrun.enabled": false,
|
54
|
-
"browser.newtab.url": "about:blank",
|
55
|
-
"browser.newtabpage.enabled": false,
|
56
|
-
"browser.startup.page": 0,
|
57
|
-
"browser.startup.homepage": "about:blank",
|
58
|
-
"browser.startup.homepage_override.mstone": "ignore",
|
59
|
-
"browser.usedOnWindows10.introURL": "about:blank",
|
60
|
-
"dom.max_chrome_script_run_time": 30,
|
61
|
-
"dom.max_script_run_time": 30,
|
62
|
-
"dom.report_all_js_exceptions": true,
|
63
|
-
"javascript.options.showInConsole": true,
|
64
|
-
"startup.homepage_welcome_url": "about:blank",
|
65
|
-
"startup.homepage_welcome_url.additional": "about:blank",
|
66
|
-
"webdriver_accept_untrusted_certs": true,
|
67
|
-
"webdriver_assume_untrusted_issuer": true
|
68
|
-
}
|
69
|
-
}
|
Binary file
|
Binary file
|
Binary file
|