代码拉取完成,页面将自动刷新
同步操作将从 lichao/TestWeb 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*!
OC_webtest v0.0.1
Copyright 2014 OrChange Inc. All rights reserved.
Licensed under the GPL License.
*/
script = {
"MAIN" : false,
"EDIT" : false,
"TEST" : false,
"DEBUG": false,
};
/**=====================
* GLOBAL DEFINE!
*=====================*/
var config = {
// Set loop times that you want in default.
"DEFAULT_LOOP_COUNT" : 2000,
// User can define to use this delay.
// When new DelayStep.
"DEFAULT_DELAY" : 4000,
// Do you need output error to console?
"DEBUG_MODE" : true,
// This setting just affect delay model.
"DELAY_RATIO" : 1.0,
// Enable / Disable the mode of ratio of delay.
"DELAY_RATIO_MODE" : false,
// If the value is true, script will overriding
// function alert() in the iframe.window object.
"DISABLE_ALERT" : false,
"EVENT_TEST_CYCLE" : 50,
"EVENT_TIMEOUT":10000,
// If use focus "stepby" mode, all method of
// step will be lose efficacy.
"FOCUS_STEPBY" : false,
// How long will the highlight div disappeared.
"HIGHLIGHT_REMOVE_DELAY" : 2000,
// You can use a new name of the jQuery object
// whitch include the iframe element.
"IFRAME_HANDLE" : "$iframe",
// Highlight the DOM of operation when doing
// test.
"SHOW_AREA_MODE" : false,
// Define the title of probe.html
"TITLE" : "PROBE",
// Define the url of Test Management Server.
"TEST_SERVER" : "http://localhost/testweb/",
"TEST_SCRIPT_PATH" : "http://localhost/testweb/",
};
/**=====================
* RUNTIME
*=====================*/
$(document).ready(function(){
// PROBE initialization
$("head").html("<title>"+config.TITLE+"</title>");
$("html").css({
"padding":"0px",
"margin":"0px",
"height":"100%",
});
$("body").html('<iframe></iframe><a id="StepTrigger"></a>').css({
"padding":"0px",
"margin":"0px",
"height":"100%",
"overflow":"hidden",
});
$("iframe").attr("height","100%").css({
"margin":"0",
"padding":"0",
"border":"none",
"width":"100%",
});
$("#StepTrigger").css({
"display" : "block",
"width" : "20px",
"height" : "20px",
"position" : "fixed",
"bottom" : "0px",
"right" : "0px",
"background" : "green"
});
// Get jQuery object of the iframe.
window[config.IFRAME_HANDLE] = $('iframe');
$.getScript( config.TEST_SERVER+'test.js',function(){
if( config.DEBUG_MODE === true ){
$.getScript( config.TEST_SERVER+'debug.js');
}
});
// Overriding iframe.alert() if DISABLE_ALERT
// is true.
if( config.DISABLE_ALERT ){
//TODO test it !
$('iframe').load(function(){
this.contentWindow.alert = function(str){
console.log(str);
}
});
}
$iframe.attr("src","http://www.or-change.com.cn/Task/");
});
// Mark main.js have been loaded successfully.
script.MAIN = true;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。