atoms.forward_ios.js Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2012-2013 eBay Software Foundation and ios-driver committers
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
function(){return function(){var f=!0,g=!1,h=this;function k(a,b){function c(){}c.prototype=b.prototype;a.b=b.prototype;a.prototype=new c};var l=window;function m(a,b){this.code=a;this.message=b||"";this.name=n[a]||n[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}k(m,Error);
var n={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
m.prototype.toString=function(){return this.name+": "+this.message};function p(a,b){for(var c=1;c(0==e[1].length?
0:parseInt(e[1],10))?1:0)||((0==d[2].length)<(0==e[2].length)?-1:(0==d[2].length)>(0==e[2].length)?1:0)||(d[2]e[2]?1:0)}while(0==c)}return c};function t(){return h.navigator?h.navigator.userAgent:null}var u,v="",w=/WebKit\/(\S+)/.exec(t());u=v=w?w[1]:"";var x={};var y,z,A,B,C,D,E;E=D=C=B=A=z=y=g;var F=t();F&&(-1!=F.indexOf("Firefox")?y=f:-1!=F.indexOf("Camino")?z=f:-1!=F.indexOf("iPhone")||-1!=F.indexOf("iPod")?A=f:-1!=F.indexOf("iPad")?B=f:-1!=F.indexOf("Android")?C=f:-1!=F.indexOf("Chrome")?D=f:-1!=F.indexOf("Safari")&&(E=f));var G=y,I=z,J=A,K=B,L=C,M=D,aa=E;function N(a){return(a=a.exec(t()))?a[1]:""}var ba=function(){if(G)return N(/Firefox\/([0-9.]+)/);if(M)return N(/Chrome\/([0-9.]+)/);if(aa)return N(/Version\/([0-9.]+)/);if(J||K){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(t());if(a)return a[1]+"."+a[2]}else{if(L)return(a=N(/Android\s+([0-9.]+)/))?a:N(/Version\/([0-9.]+)/);if(I)return N(/Camino\/([0-9.]+)/)}return""}();var O;if(L){var P=/Android\s+([0-9\.]+)/.exec(t());O=P?P[1]:"0"}else O="0";var ca=O;L&&(L?q(ca,2.3):q(ba,2.3));function V(a){Error.captureStackTrace?Error.captureStackTrace(this,V):this.stack=Error().stack||"";a&&(this.message=String(a))}k(V,Error);V.prototype.name="CustomError";function W(a,b){b.unshift(a);V.call(this,p.apply(null,b));b.shift();this.a=a}k(W,V);W.prototype.name="AssertionError";var da=x["533"]||(x["533"]=0<=q(u,"533"));function X(a){var b=da?l.history.length-1:null;a=void 0!==a?a:1;if(0>=a)throw new m(13,"number of pages must be positive");if(null!==b&&a>b)throw new m(13,"number of pages must be less than the length of the browser history");l.history.go(a)}var Y=["_"],Z=h;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&void 0!==X?Z[$]=X:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);}