$=QT4i={version:"2.5",modified:"2015-06-05;",developer:"tester"};(function(d){d.e={v:function(a,e){for(var b in a.prototype)e.prototype[b]=a.prototype[b]},q:function(a){return Object.prototype.toString.call(a).replace(RegExp(/^\[.* |\]$/g),"")}};d.base=d.e;d.base.classextends=d.e.v;d.base.getObjectClassName=d.e.q})($);
(function(d){function a(c,b){b=Boolean(b);switch(typeof c){case "undefined":return b?e("undefined",b):"undefined";case "string":return e(c,b);case "number":return String(c);case "boolean":return b?c?"True":"False":String(c);case "function":return b?e(String(c),b):String(c);case "object":if(null===c)return b?"None":String(c);if(c instanceof Array){for(var f=[],r=0;r<c.length;r++)f.push(a(c[r],b));return"["+f.join(", ")+"]"}f=[];for(r in c)f.push(e(r,b)+": "+a(c[r],b));return"{"+f.join(", ")+"}";default:return c}}
function e(c,a){return Boolean(a)?b(c):!/'|"/.test(c)||/'/.test(c)&&!/"/.test(c)?'"'+c+'"':!/'/.test(c)&&/"/.test(c)?"'"+c+"'":'"'+encodeURIComponent(c)+'"'}function b(c){if(/'|"/.test(c)){if(/'''/.test(c)&&!/"""/.test(c))return'"""'+c+'"""';if(!/'''/.test(c)&&/"""/.test(c))return"'''"+c+"'''";if(/'''/.test(c)||/"""/.test(c))return'"'+encodeURIComponent(c)+'"';if(/'/.test(c)&&/"/.test(c))return'"""'+c+'"""';if(/'/.test(c)&&!/"/.test(c))return'"'+c+'"';if(!/'/.test(c)&&/"/.test(c))return"'"+c+"'"}else return'"'+
c+'"';return'"'+encodeURIComponent(c.toString())+'"'}d.a={L:function(c){return RegExp(/^\d+$/).test(c)?parseInt(c):RegExp(/^\d+\.\d+$/).test(c)?parseFloat(c):RegExp(/^true$/i).test(c)?!0:RegExp(/^false$/i).test(c)?!1:c},R:function(c){return/^ +$/.test(c)},S:function(c,b){b=b&&0!=b.length?b:" ";return c.replace(RegExp("^"+b+"*"),"")},U:function(b,a){a=a&&0!=a.length?a:" ";return b.replace(RegExp(a+"*$"),"")},n:function(b,a){a=a&&0!=a.length?a:" ";return b.replace(RegExp("^"+a+"*|"+a+"*$","g"),"")},
c:function(b,e){return a(b,e).replace(RegExp(/; *$/),"")}};d.str=d.a;d.str.objectToString=d.a.c})($);
(function(d){function a(b){this.path=b;this.timeout=2E3;this.interval=5;this.o=!0;b=(new Date).getTime();try{this.s=c.J(this.path)}catch(a){throw Error('QPath(path) - "path='+this.path+'" is invaild.');}this.parse_time=(new Date).getTime()-b;this.select_time=null}function e(b){if("string"!=typeof b||""==b)throw Error("path is not a valid string.");b=d.a.n(b);for(var a={},c=RegExp(/^\= *|^\< *|^\> */),e=RegExp(/'|"/),m=null,n=null,g=null,l=0,k="",p=b.length-1;-1<p;p--){var s=b[p],k=s+k;e.test(s)&&
(null==m?(m=s,g=p):m==s&&(n=p));if(null!=m&&c.test(k)){var m=null,l=l+1,s="{"+l+"}",u=b.slice(n+1,g);a[s]=u;b=b.slice(0,n)+s+b.slice(g+1);g=n=null}}return{path:b,M:a}}var b={},c={K:function(b){var a=[],c=b.path;b=b.M;for(var e=RegExp(/^\{\d+\}$/),m=RegExp(/\&{1,2}|\|{1,2}/g),g=RegExp(/\!\=|\<\=|\>\=|\~\=|\=|\<|\>/),h=c.slice(1).split(c[0]),l=0;l<h.length;l++){var k=h[l];if(0<k.length){for(var p={h:null,m:[],d:null,l:null,path:c[0]},s=k.split(m),k=k.match(m),u=0;u<s.length;u++){var v=s[u];if(0<v.length){var q=
v.split(g),x=d.a.n(q[0]).toLocaleLowerCase(),q=d.a.n(q[1]),v=v.match(g)[0],y=0==u?"&&":k[u-1];e.test(q)&&(q=b[q]);q=d.a.L(q);switch(x){case "instance":p.d=q;break;case "maxdepth":p.l=q;break;default:p.m.push({name:x,g:y,value:q,u:v}),"classname"==x&&(p.h=q)}p.path=p.path==c[0]?p.path+(x+v+d.a.c(q)):p.path+(" "+y+" "+x+v+d.a.c(q))}}p.path=encodeURIComponent(p.path);a.push(p)}}return a},J:function(b){return c.K(e(b))}},g={r:function(b,a){var c=a.name.toLowerCase();if(RegExp(/^isEnabled$|^enabled$|^isValid$|^valid$|^isVisible$|^visible$|^hasKeyboardFocus$|^focus$/i).test(c))switch(c){case "isenabled":c=
"isEnabled";break;case "enabled":c="isEnabled";break;case "isvalid":c="isValid";break;case "valid":c="isValid";break;case "isvisible":c="isVisible";break;case "visible":c="isVisible";break;case "haskeyboardfocus":c="hasKeyboardFocus";break;case "focus":c="hasKeyboardFocus"}var e=null,e="classname"==c?d.e.q(b):b[c]?b[c]():null;switch(a.u){case "=":return a.value==e?!0:!1;case "!=":return a.value!=e?!0:!1;case ">":return a.value>e?!0:!1;case "<":return a.value<e?!0:!1;case ">=":return a.value>=e?!0:
!1;case "<=":return a.value<=e?!0:!1;case "~=":return RegExp(a.value).test(e)?!0:!1;default:return!1}},w:function(b,c){for(var a=!0,e=0;e<c.m.length;e++){var m=c.m[e];if("&&"==m.g||"&"==m.g)a=a&&g.r(b,m);if("||"==m.g||"|"==m.g)a=a||g.r(b,m)}return a},j:function(b,a,c,e,m){var d=[];if(!c)return d;if("."==e.h)return d.push(a),d;if(".."==e.h)return d.push(a.parent()),d;m=m?m:e.l?e.l:0;a=a.elements();for(var h=[],l=0;l<a.length;l++){var k=a[l];if(g.w(k,e)){null==e.d?d.push(k):(h.push(k),e.d==h.length&&
d.push(k));if(b&&0<d.length)return d;if(e.d&&e.d==h.length)break}}if(0<m)for(l=0;l<a.length&&!(d=d.concat(g.j(b,a[l],c,e,m-1)),b&&0<d.length);l++);return d},k:function(b,a){for(var c="",e="",d="",g=0;g<b.length;g++){a&&g<=a&&(e+=b[g].path);if(!a||g>a)d+=b[g].path;c+=b[g].path}return{path:c,valid_path_part:e,invalid_path_part:d}},p:function(b,a,c,e){var d=[c],n=[];c=null;for(var h=0;h<a.length-1;h++){for(var l=[],k=0;k<d.length;k++)l=l.concat(g.j(!1,d[k],e,a[h]));d=l;0<d.length&&(c=h)}h=g.k(a,c);h=
{element:null,elements:[],path:h.path,valid_path_part:h.valid_path_part,invalid_path_part:h.invalid_path_part};if(1>d.length)return h;for(k=0;k<d.length;k++)if(n=n.concat(g.j(b,d[k],e,a[a.length-1])),b)return(b=0<n.length?n[0]:null)&&(c=a.length-1),h=g.k(a,c),h={element:b,elements:[],path:h.path,valid_path_part:h.valid_path_part,invalid_path_part:h.invalid_path_part};if(!b)return 0<n.length&&(c=a.length-1),h=g.k(a,c),h={element:null,elements:n,path:h.path,valid_path_part:h.valid_path_part,invalid_path_part:h.invalid_path_part}}};
a.prototype.findElement=function(b,a,c,e){b="number"==typeof b?b:this.timeout;a="number"==typeof a?a:this.interval;e="boolean"==typeof e?e:this.o;for(var d=0,n=null,h=null,l=(new Date).getTime();;){var k=UIATarget.localTarget();c=c?c:k.frontMostApp();h=(new Date).getTime();k.pushTimeout(0);n=g.p(!0,this.s,c,e);k.popTimeout();this.select_time=(new Date).getTime()-h;d+=1;n.find_count=d;n.find_time=(new Date).getTime()-l;if((h=n.element)||0==b||(new Date).getTime()-l>=b)break;0<a&&(b-((new Date).getTime()-
l)<a?k.delay((b-((new Date).getTime()-l))/1E3):k.delay(a/1E3))}return n};a.prototype.findElements=function(b,a,c,e){b="number"==typeof b?b:this.timeout;a="number"==typeof a?a:this.interval;e="boolean"==typeof e?e:this.o;for(var d=0,n=null,h=[],l=(new Date).getTime();;){var k=UIATarget.localTarget();c=c?c:k.frontMostApp();h=(new Date).getTime();k.pushTimeout(0);n=g.p(!1,this.s,c,e);k.popTimeout();this.select_time=(new Date).getTime()-h;d+=1;n.find_count=d;n.find_time=(new Date).getTime()-l;h=n.elements;
if(0<h.length||0==b||(new Date).getTime()-l>=b)break;0<a&&(b-((new Date).getTime()-l)<a?k.delay((b-((new Date).getTime()-l))/1E3):k.delay(a/1E3))}return n};d.t=function(c,e){if("boolean"==typeof e?e:1){var d=b[c];d||(d=new a(c),b[c]=d);return d}return new a(c)};d.QPath=d.t})($);
(function(d){(function(a){function e(b,c){b=b?b:"logMessage";c="string"==typeof c?c:a.a.c(c);UIALogger[b](c)}a.b={H:function(b){e("logStart",b)},F:function(b){e("logMessage",b)},A:function(b){e("logDebug",b)},I:function(b){e("logWarning",b)},D:function(b){e("logIssue",b)},B:function(b){e("logError",b)},C:function(b){e("logFail",b)},G:function(b){e("logPass",b)}};a.log=function(b){e("logMessage",b)};a.logger=a.b;a.logger.logStart=a.b.H;a.logger.logMessage=a.b.F;a.logger.logDebug=a.b.A;a.logger.logWarning=
a.b.I;a.logger.logIssue=a.b.D;a.logger.logError=a.b.B;a.logger.logFail=a.b.C;a.logger.logPass=a.b.G;a.log=a.log})(d);(function(a){UIATarget.prototype.deviceinfo=function(){return{model:this.model(),name:this.name(),systemName:this.systemName(),systemVersion:this.systemVersion()}};UIAElement.prototype.getClassName=function(){return Object.prototype.toString.call(this).replace(RegExp(/^\[.* |\]$/g),"")};UIAElement.prototype.logClassName=function(){var e=this.getClassName();a.log(e);return e};UIAElement.prototype._original_hasKeyboardFocus=
UIAElement.prototype.hasKeyboardFocus;UIAElement.prototype.hasKeyboardFocus=function(){return Boolean(this._original_hasKeyboardFocus())};UIAElement.prototype._original_isEnabled=UIAElement.prototype.isEnabled;UIAElement.prototype.isEnabled=function(){return Boolean(this._original_isEnabled())};UIAElement.prototype._original_isValid=UIAElement.prototype.isValid;UIAElement.prototype.isValid=function(){return Boolean(this._original_isValid())};UIAElement.prototype._original_isVisible=UIAElement.prototype.isVisible;
UIAElement.prototype.isVisible=function(){return Boolean(this._original_isVisible())};UIAElement.prototype.getElementsByClassName=function(a,b){function c(b,a,e,d){d=d?d:[];a=a.elements();for(var g=a.length,f=0;f<g;f++){var l=a[f].getClassName();(l==b||RegExp(b).test(l))&&d.push(a[f]);e&&c(b,a[f],e,d)}return d}b="boolean"==typeof b?b:!0;var d=UIATarget.localTarget();d.pushTimeout(0);var f=c(a,this,b);d.popTimeout();return f};UIAElement.prototype.getElementDict=function(){return{classname:this.getClassName(),
label:this.label(),name:this.name(),value:this.value(),focus:this.hasKeyboardFocus(),enabled:this.isEnabled(),valid:this.isValid(),visible:this.isVisible(),rect:this.rect()}};UIAElement.prototype.logElementDict=function(){var e=this.getElementDict();a.log(e);return e};UIAElement.prototype.getElementTree=function(e){function b(c,e,d){e=e?!0:!1;d=d?d:"";var t=c.getElementDict();e&&a.log(d+a.a.c(t));c=c.elements();for(var w=c.length,m=[],n=0;n<w;n++)m.push(b(c[n],e,"|--"+d));t.children=m;return t}e=
e?!0:!1;var c=UIATarget.localTarget();c.pushTimeout(0);e=b(this,e);c.popTimeout();return e};UIAElement.prototype.logElementTreeExt=function(){return this.getElementTree(!0)};UIAElement.prototype.getAllTexts=function(){function a(b,c){c=c?c:[];b.label&&c.push(b.label);b.name&&c.push(b.name);b.value&&c.push(b.value);for(var d=0;d<b.children.length;d++)a(b.children[d],c);return c}return a(this.getElementTree())};UIAElement.prototype._original_tap=UIAElement.prototype.tap;UIAElement.prototype.tap=function(a,
b){a=a&&0!=a?a:0;b=b&&0!=b?b:0;var c=null,d=null,f=this.rect();0!=a&&0!=b&&(c=0<a?a/f.size.width:0>a?(f.size.width+a)/f.size.width:null,d=0<b?b/f.size.height:0>b?(f.size.height+b)/f.size.height:null);try{0==a&&0==b?this._original_tap():c&&d&&this.tapWithOptions({tapOffset:{x:c,y:d}})}catch(r){a=0!=a?0>a?f.origin.x+f.size.width+a:f.origin.x+a:f.origin.x+f.size.width/2,b=0!=b?0>b?f.origin.y+f.size.height+b:f.origin.y+b:f.origin.y+f.size.height/2,UIATarget.localTarget().tap({x:a,y:b})}};UIAElement.prototype.typeString=
function(a){UIATarget.localTarget().frontMostApp().keyboard().typeString(a)}})(d)})($);
(function(d){d.operator={flickToUp:function(a){a=a&&1<a?a:1;for(var e=UIATarget.f(),b=e.rect().size,c={x:b.width/2,y:50},b={x:b.width/2,y:150},d=0;d<a;d++)e.i(b,c)},flickToBottom:function(a){a=a&&1<a?a:1;for(var e=UIATarget.f(),b=e.rect().size,c={x:b.width/2,y:50},b={x:b.width/2,y:b.height-50},d=0;d<a;d++)e.Q({W:c,N:b})},flickToRight:function(a){a=a&&1<a?a:1;for(var e=UIATarget.f(),b=e.rect().size,c={x:50,y:b.height/2},b={x:b.width-50,y:b.height/2},d=0;d<a;d++)e.i(c,b)},flickToLeft:function(a){a=
a&&1<a?a:1;for(var d=UIATarget.f(),b=d.rect().size,c={x:50,y:b.height/2},b={x:b.width-50,y:b.height/2},g=0;g<a;g++)d.i(b,c)},LeftDel:function(a,d){d=d&&1<d?d:1;for(var b=UIATarget.f(),c=a.rect(),g={x:c.origin.x+c.size.width/2-100,y:c.origin.y+c.size.height/2},c={x:c.origin.x+c.size.width/2+100,y:c.origin.y+c.size.height/2},f=0;f<d;f++)b.i(c,g)},waitForRect:function(a,e,b,c,g,f){f=f&&-1<f?f:5E3;for(var r=(new Date).getTime(),t=!1;(new Date).getTime()-r<f;){var w=e.P().rect();d.log(w);switch(b){case "x":var m=
w.origin.x;break;case "y":m=w.origin.y}d.log(m);switch(c){case ">=":m>=g&&(t=!0);break;case "<=":m<=g&&(t=!0)}if(!0==t)break}!0==t?(a="[[operator]]"+a+": \u63a7\u4ef6\u5750\u6807\u6ee1\u8db3\u6761\u4ef6\uff08"+m+c+g+"\uff09;",d.log(" "),UIALogger.logPass(a)):(a="[[operator]]"+a+": \u63a7\u4ef6\u5750\u6807\u4e0d\u6ee1\u8db3\u6761\u4ef6\uff08"+m+c+g+"\uff09;",d.log(" "),UIALogger.logFail(a));return t}}})($);
(function(d){d.assert={equals:function(a,e,b){a=a+":actual="+d.a.c(e)+";expect="+d.a.c(b)+";";var c=!1;e==b?(UIALogger.logPass(a),c=!0):UIALogger.logFail(a);return c},match:function(a,e,b){a=a+":actual="+d.a.c(e)+";expect="+d.a.c(b)+";";var c=!1;RegExp(b).test(e)?(UIALogger.logPass(a),c=!0):UIALogger.logFail(a);return c}};d.BaseUiLib=function(){throw Error("can not be instantiated: BaseUiLib");};d.BaseUiLib.prototype={__check_locators__:function(a){if(!this.locators)throw Error('please check the property "locators".');
if(!this.locators[a])throw Error('locators key error "'+a+'".');},Controls:function(a,e,b,c,g){this.__check_locators__(a);var f=this.locators[a];e=e&&-1<e?e:5E3;var r=(new Date).getTime();b=f.findElement(e,c,b);r=(new Date).getTime()-r;if(g&&!b)throw Error("\u63a7\u4ef6\u672a\u627e\u5230: "+f.path);d.log(" ");d.log("BaseUiLib.Controls  : ["+a+"]");d.log("BaseUiLib.Controls  : "+f.path);d.log("Path\u5355\u6b21\u89e3\u6790\u8017\u65f6(\u6beb\u79d2): "+f.T);d.log("Path\u5355\u6b21\u5b9a\u4f4d\u8017\u65f6(\u6beb\u79d2): "+
f.V);d.log("Path\u591a\u6b21\u5b9a\u4f4d\u8017\u65f6(\u6beb\u79d2): "+r+"(\u8d85\u65f6\u8303\u56f4:"+e+"\u6beb\u79d2)");return b}}})($);
(function(d){d.TestCase=function(){throw Error("can not be instantiated: TestCase");};d.TestCase.prototype={EnumStatus:{Design:"Design",Implement:"Implement",Review:"Review",Ready:"Ready",Suspend:"Suspend"},EnumPriority:{BVT:"BVT",High:"High",Normal:"Normal",Low:"Low"},description:'\u811a\u672c\u672a\u8fdb\u884c\u7528\u4f8b\u63cf\u8ff0 - "description"',owner:'\u811a\u672c\u672a\u63cf\u8ff0\u7528\u4f8b\u8d1f\u8d23\u4eba - "owner"',timeout:"30",status:"Ready",priority:"BVT",log:function(a){UIALogger.logMessage(a)},
stepCount:0,startStep:function(a){this.stepCount+=1;d.log(" ");UIALogger.logStart("[[Step"+this.stepCount+"]]"+a)},captureScreenForStep:function(){var a="Step"+this.stepCount;d.log(" ");UIATarget.localTarget().captureScreenWithName(a);UIALogger.logMessage("[[ScreenshotCaptured]]"+a)},assertEquals:function(a,e,b){!1==d.assert.O(a,e,b)&&this.captureScreenForStep()},assertMatch:function(a,e,b){!1==d.assert.match(a,e,b)&&this.captureScreenForStep()},run:function(){this.log("--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---");
this.log("\u7528\u4f8b\u63cf\u8ff0: "+this.description);this.log("\u7528\u4f8b\u4f5c\u8005: "+this.owner);this.log("\u7528\u4f8b\u8d85\u65f6: "+this.timeout+"(\u5206\u949f)");this.log("\u7528\u4f8b\u72b6\u6001: "+this.status);this.log("--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---");if(this.status==this.EnumStatus.Ready)try{this.setUp&&(this.startStep("\u5f00\u59cb\u6267\u884csetUp\u65b9\u6cd5"),this.setUp()),this.runTest&&(this.startStep("\u5f00\u59cb\u6267\u884crunTest\u65b9\u6cd5"),
this.runTest()),this.tearDown&&(this.startStep("\u5f00\u59cb\u6267\u884ctearDown\u65b9\u6cd5"),this.tearDown())}catch(a){throw this.captureScreenForStep(),a;}}}})($);
