diff --git a/ElectronJS/EasySpider_en.crx b/ElectronJS/EasySpider_en.crx
index a8241d6..8f6c50b 100644
Binary files a/ElectronJS/EasySpider_en.crx and b/ElectronJS/EasySpider_en.crx differ
diff --git a/ElectronJS/EasySpider_zh.crx b/ElectronJS/EasySpider_zh.crx
index db5580f..a6d6ea4 100644
Binary files a/ElectronJS/EasySpider_zh.crx and b/ElectronJS/EasySpider_zh.crx differ
diff --git a/ElectronJS/main.js b/ElectronJS/main.js
index 19683e2..4a8d705 100644
--- a/ElectronJS/main.js
+++ b/ElectronJS/main.js
@@ -198,7 +198,7 @@ async function findElement(driver, by, value, iframe = false) {
}
}
-async function findElementAcrossAllWindows(msg) {
+async function findElementAcrossAllWindows(msg, notifyBrowser=true) {
let handles = await driver.getAllWindowHandles();
// console.log("handles", handles);
let content_handle = current_handle;
@@ -223,9 +223,9 @@ async function findElementAcrossAllWindows(msg) {
} catch {
iframe = msg.iframe;
}
- if (iframe) {
- notify_browser("在IFrame中执行操作可能需要较长时间,请耐心等待。", "Executing operations in IFrame may take a long time, please wait patiently.", "info");
- }
+ // if (iframe) {
+ // notify_browser("在IFrame中执行操作可能需要较长时间,请耐心等待。", "Executing operations in IFrame may take a long time, please wait patiently.", "info");
+ // }
let xpath = "";
try {
xpath = msg.message.xpath;
@@ -257,7 +257,7 @@ async function findElementAcrossAllWindows(msg) {
}
}
}
- if (element == null) {
+ if (element == null && notifyBrowser) {
notify_browser("无法找到元素,请检查xpath是否正确:" + xpath, "Cannot find the element, please check if the xpath is correct: " + xpath, "warning");
}
return element;
@@ -356,7 +356,8 @@ async function beginInvoke(msg, ws) {
url = parent_node["parameters"]["textList"].split("\n")[0];
}
await driver.get(url);
- } else if (option == 2 || option == 7) { //点击事件
+ }
+ else if (option == 2 || option == 7) { //点击事件
let elementInfo = {"iframe": parameters.iframe, "xpath": parameters.xpath, "id": -1};
if (parameters.useLoop) {
let parent_node = JSON.parse(msg.message.parentNode);
@@ -378,7 +379,39 @@ async function beginInvoke(msg, ws) {
await new Promise(resolve => setTimeout(resolve, afterJSWaitTime));
}
send_message_to_browser(JSON.stringify({"type": "cancelSelection"}));
- } else if (option == 4) { //键盘输入事件
+ }
+ else if (option == 3) { //提取数据
+ notify_browser("提示:提取数据操作只能试运行设置的JavaScript语句。", "Hint: can only test JavaScript statement set in the data extraction operation.", "info");
+ let paras = parameters.paras; //所有的提取数据参数
+ let not_found_xpaths = [];
+ for (let i = 0; i < paras.length; i++) {
+ let para = paras[i];
+ let xpath = para.relativeXPath;
+ if (para.relative) {
+ let parent_node = JSON.parse(msg.message.parentNode);
+ let parent_xpath = parent_node.parameters.xpath;
+ xpath = parent_xpath + xpath;
+ }
+ let elementInfo = {"iframe": para.iframe, "xpath": xpath, "id": -1};
+ let element = await findElementAcrossAllWindows(elementInfo, notifyBrowser=false);
+ if (element != null) {
+ if (para.beforeJS != "") {
+ await driver.executeScript(para.beforeJS, element);
+ await new Promise(resolve => setTimeout(resolve, para.beforeJSWaitTime));
+ }
+ if (para.afterJS != "") {
+ await driver.executeScript(para.afterJS, element);
+ await new Promise(resolve => setTimeout(resolve, para.afterJSWaitTime));
+ }
+ } else {
+ not_found_xpaths.push(xpath);
+ }
+ }
+ if (not_found_xpaths.length > 0) {
+ notify_browser("无法找到以下元素,请检查xpath是否正确:" + not_found_xpaths.join("\n"), "Cannot find the element, please check if the xpath is correct: " + not_found_xpaths.join("\n"), "warning");
+ }
+ }
+ else if (option == 4) { //键盘输入事件
let elementInfo = {"iframe": parameters.iframe, "xpath": parameters.xpath, "id": -1};
let value = node.parameters.value;
if (node.parameters.useLoop) {
@@ -432,7 +465,18 @@ async function beginInvoke(msg, ws) {
// Interacting with dropdown element based on optionMode
switch (optionMode) {
case 0: //切换到下一个选项
- let script = "var options = arguments[0].options;for (var i = 0; i < options.length; i++) {if (options[i].selected) {options[i].selected = false;if (i == options.length - 1) {options[0].selected = true;} else {options[i + 1].selected = true;}break;}}";
+ let script = `var options = arguments[0].options;
+ for (var i = 0; i < options.length; i++) {
+ if (options[i].selected) {
+ options[i].selected = false;
+ if (i == options.length - 1) {
+ options[0].selected = true;
+ } else {
+ options[i + 1].selected = true;
+ }
+ break;
+ }
+ }`;
await driver.executeScript(script, element);
break;
case 1:
@@ -544,7 +588,7 @@ let wss = new WebSocket.Server({port: websocket_port});
wss.on('connection', function (ws) {
ws.on('message', async function (message, isBinary) {
let msg = JSON.parse(message.toString());
- console.log("\n\nGET A MESSAGE: ", msg);
+ // console.log("\n\nGET A MESSAGE: ", msg);
// console.log(msg, msg.type, msg.message);
if (msg.type == 0) {
if (msg.message.id == 0) {
@@ -553,17 +597,17 @@ wss.on('connection', function (ws) {
// socket_window = null;
// console.log("socket_window closed");
// });
- console.log("set socket_window")
+ // console.log("set socket_window at time: ", new Date());
} else if (msg.message.id == 1) {
socket_start = ws;
- console.log("set socket_start")
+ console.log("set socket_start at time: ", new Date());
} else if (msg.message.id == 2) {
socket_flowchart = ws;
// socket_flowchart.on('close', function (event) {
// socket_flowchart = null;
// console.log("socket_flowchart closed");
// });
- console.log("set socket_flowchart");
+ console.log("set socket_flowchart at time: ", new Date());
} else { //其他的ID是用来标识不同的浏览器标签页的
await new Promise(resolve => setTimeout(resolve, 2300));
let handles = await driver.getAllWindowHandles();
@@ -577,6 +621,15 @@ wss.on('connection', function (ws) {
socket_flowchart.send(JSON.stringify({"type": "title", "data": {"title": msg.message.title}}));
allWindowSockets.push(ws);
allWindowScoketNames.push(msg.message.id);
+ console.log("set socket for id: ", msg.message.id, " at time: ", new Date());
+ ws.on('close', function (event) {
+ let index = allWindowSockets.indexOf(ws);
+ if (index > -1) {
+ allWindowSockets.splice(index, 1);
+ allWindowScoketNames.splice(index, 1);
+ }
+ console.log("socket for id: ", msg.message.id, " closed at time: ", new Date());
+ });
// console.log("handle_pairs: ", handle_pairs);
}
} else if (msg.type == 10) {
@@ -626,7 +679,7 @@ async function runBrowser(lang = "en", user_data_folder = '', mobile = false) {
.setChromeOptions(options)
.setChromeService(serviceBuilder)
.build();
- await driver.manage().setTimeouts({implicit: 10000, pageLoad: 10000, script: 10000});
+ await driver.manage().setTimeouts({implicit: 3, pageLoad: 10000, script: 10000});
await driver.executeScript("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})");
// await driver.executeScript("localStorage.clear();"); //重置参数数量
const cdpConnection = await driver.createCDPConnection("page");
diff --git a/ElectronJS/src/taskGrid/FlowChart.html b/ElectronJS/src/taskGrid/FlowChart.html
index 2e390c2..980ced5 100644
--- a/ElectronJS/src/taskGrid/FlowChart.html
+++ b/ElectronJS/src/taskGrid/FlowChart.html
@@ -91,7 +91,7 @@
- Hint: Move the mouse to the smiley face to view the hint, double-click the option in the flowchart to try to run.
+ Tip: Hover over the smiley face to view hints, double-click on an action in the flowchart to test run, right-click on an action to see more options.
Option Name:
diff --git a/ElectronJS/src/taskGrid/FlowChart.js b/ElectronJS/src/taskGrid/FlowChart.js
index 29a076b..4a16827 100644
--- a/ElectronJS/src/taskGrid/FlowChart.js
+++ b/ElectronJS/src/taskGrid/FlowChart.js
@@ -386,7 +386,7 @@ function elementDblClick(e) {
try {
let nodeType = app._data.nowNode["option"]
if (nodeType >= 8) {
- showInfo(LANG("试运行功能不适用于循环和条件分支操作。", "The trial run function is not applicable to loop and condition branch operations."))
+ showInfo(LANG("试运行功能不适用于循环和条件分支操作,请试运行循环或条件分支内部的具体操作,如点击元素。", "The trial run function is not applicable to loop and condition branch operations. Please try to run the specific operations in the loop/condition branch, such as clicking elements."));
} else {
if(nodeType == 5 && app._data.nowNode["parameters"]["codeMode"] != 0){
showInfo(LANG("试运行自定义操作功能只适用于执行JavaScript操作。", "The trial run custom action function is only applicable to run JavaScript operation."))
diff --git a/ElectronJS/src/taskGrid/FlowChart_CN.html b/ElectronJS/src/taskGrid/FlowChart_CN.html
index 8955951..3fb183f 100644
--- a/ElectronJS/src/taskGrid/FlowChart_CN.html
+++ b/ElectronJS/src/taskGrid/FlowChart_CN.html
@@ -91,7 +91,7 @@
- 提示:鼠标移到笑脸可查看提示,在流程图中双击 选项可试运行。
+ 提示:鼠标移到笑脸可查看提示,在流程图中双击 操作可试运行,右键 点击操作查看更多选项。
选项名称:
diff --git a/ElectronJS/tasks/237.json b/ElectronJS/tasks/237.json
index 022ce80..6a780b1 100644
--- a/ElectronJS/tasks/237.json
+++ b/ElectronJS/tasks/237.json
@@ -1,887 +1 @@
-{
- "id": 237,
- "name": "EXEC自定义函数示例:中国地震台网——历史查询",
- "url": "https://www.ceic.ac.cn/history",
- "links": "https://www.ceic.ac.cn/history",
- "create_time": "12/9/2023, 3:36:47 AM",
- "update_time": "12/10/2023, 11:57:28 AM",
- "version": "0.6.0",
- "saveThreshold": 10,
- "quitWaitTime": 60,
- "environment": 0,
- "maximizeWindow": 0,
- "maxViewLength": 15,
- "recordLog": 1,
- "outputFormat": "xlsx",
- "saveName": "current_time",
- "inputExcel": "",
- "startFromExit": 0,
- "pauseKey": "k",
- "containJudge": false,
- "desc": "https://www.ceic.ac.cn/history",
- "inputParameters": [
- {
- "id": 0,
- "name": "urlList_0",
- "nodeId": 1,
- "nodeName": "打开网页",
- "value": "https://www.ceic.ac.cn/history",
- "desc": "要采集的网址列表,多行以\\n分开",
- "type": "text",
- "exampleValue": "https://www.ceic.ac.cn/history"
- },
- {
- "id": 1,
- "name": "loopText_1",
- "nodeId": 2,
- "nodeName": "循环",
- "desc": "要输入的文本/网址,多行以\\n分开",
- "type": "text",
- "exampleValue": "15\n25\n35",
- "value": "15\n25\n35"
- },
- {
- "id": 2,
- "name": "loopTimes_循环点击单个元素_2",
- "nodeId": 5,
- "nodeName": "循环点击单个元素",
- "desc": "循环循环点击单个元素执行的次数(0代表无限循环)",
- "type": "int",
- "exampleValue": 0,
- "value": 0
- }
- ],
- "outputParameters": [
- {
- "id": 0,
- "name": "参数1_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "3.7"
- },
- {
- "id": 1,
- "name": "参数2_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "2023-11-3003:44:10"
- },
- {
- "id": 2,
- "name": "参数3_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "37.53"
- },
- {
- "id": 3,
- "name": "参数4_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "112.47"
- },
- {
- "id": 4,
- "name": "参数5_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "28"
- },
- {
- "id": 5,
- "name": "参数6_链接文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "山西太原市清徐县"
- },
- {
- "id": 6,
- "name": "参数7_链接地址",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "https://news.ceic.ac.cn/CC20231130034410.html"
- },
- {
- "id": 7,
- "name": "参数8_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "震级(M)"
- },
- {
- "id": 8,
- "name": "参数9_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "发震时刻(UTC+8)"
- },
- {
- "id": 9,
- "name": "参数10_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "纬度(°)"
- },
- {
- "id": 10,
- "name": "参数11_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "经度(°)"
- },
- {
- "id": 11,
- "name": "参数12_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "深度(千米)"
- },
- {
- "id": 12,
- "name": "参数13_文本",
- "desc": "",
- "type": "text",
- "recordASField": 1,
- "exampleValue": "参考位置"
- },
- {
- "id": 13,
- "name": "自定义操作",
- "desc": "自定义操作返回的数据",
- "type": "text",
- "recordASField": 0,
- "exampleValue": ""
- }
- ],
- "graph": [
- {
- "index": 0,
- "id": 0,
- "parentId": 0,
- "type": -1,
- "option": 0,
- "title": "root",
- "sequence": [1, 2],
- "parameters": {
- "history": 1,
- "tabIndex": 0,
- "useLoop": false,
- "xpath": "",
- "iframe": false,
- "wait": 0,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0
- },
- "isInLoop": false
- },
- {
- "id": 1,
- "index": 1,
- "parentId": 0,
- "type": 0,
- "option": 1,
- "title": "打开网页",
- "sequence": [],
- "isInLoop": false,
- "position": 0,
- "parameters": {
- "useLoop": false,
- "xpath": "",
- "wait": 0,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0,
- "url": "https://www.ceic.ac.cn/history",
- "links": "https://www.ceic.ac.cn/history",
- "maxWaitTime": 10,
- "scrollType": 0,
- "scrollCount": 1,
- "scrollWaitTime": 1,
- "cookies": ""
- }
- },
- {
- "id": 2,
- "index": 2,
- "parentId": 0,
- "type": 1,
- "option": 8,
- "title": "循环",
- "sequence": [3, 4, 9, 5],
- "isInLoop": false,
- "position": 1,
- "parameters": {
- "history": 1,
- "tabIndex": 0,
- "useLoop": false,
- "xpath": "",
- "iframe": false,
- "wait": 0,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0,
- "scrollType": 0,
- "scrollCount": 1,
- "scrollWaitTime": 1,
- "loopType": "3",
- "pathList": "",
- "textList": "15\n25\n35",
- "code": "",
- "waitTime": 0,
- "exitCount": 0,
- "historyWait": 2,
- "breakMode": 0,
- "breakCode": "",
- "breakCodeWaitTime": 0
- }
- },
- {
- "id": 3,
- "index": 3,
- "parentId": 2,
- "type": 0,
- "option": 4,
- "title": "输入文字",
- "sequence": [],
- "isInLoop": true,
- "position": 0,
- "parameters": {
- "history": 4,
- "tabIndex": -1,
- "useLoop": true,
- "xpath": "//*[@id=\"weidu1\"]",
- "iframe": false,
- "wait": 0,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0,
- "value": "1",
- "index": 0,
- "allXPaths": [
- "/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]",
- "//input[contains(., '')]",
- "id(\"weidu1\")",
- "//INPUT[@class='span1']",
- "//INPUT[@name='weidu1']",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"
- ]
- }
- },
- {
- "id": 4,
- "index": 4,
- "parentId": 2,
- "type": 0,
- "option": 2,
- "title": "点击查询",
- "sequence": [],
- "isInLoop": true,
- "position": 1,
- "parameters": {
- "history": 4,
- "tabIndex": -1,
- "useLoop": false,
- "xpath": "//*[@id=\"search\"]",
- "iframe": false,
- "wait": 2,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0,
- "scrollType": 0,
- "scrollCount": 1,
- "scrollWaitTime": 1,
- "clickWay": 0,
- "maxWaitTime": 10,
- "paras": [],
- "alertHandleType": 0,
- "allXPaths": [
- "/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]",
- "//a[contains(., '查询')]",
- "id(\"search\")",
- "//A[@class='check']",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"
- ]
- }
- },
- {
- "id": 6,
- "index": 5,
- "parentId": 2,
- "type": 1,
- "option": 8,
- "title": "循环点击单个元素",
- "sequence": [7, 6],
- "isInLoop": true,
- "position": 3,
- "parameters": {
- "history": 4,
- "tabIndex": -1,
- "useLoop": false,
- "xpath": "//*[contains(@class, \"pagination\")]/ul[1]/li[last()-1]/a[1]",
- "iframe": false,
- "wait": 0,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0,
- "scrollType": 0,
- "scrollCount": 1,
- "scrollWaitTime": 1,
- "loopType": 0,
- "pathList": "",
- "textList": "",
- "code": "",
- "waitTime": 0,
- "exitCount": 0,
- "historyWait": 2,
- "breakMode": 0,
- "breakCode": "",
- "breakCodeWaitTime": 0,
- "allXPaths": [
- "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]",
- "//a[contains(., '»')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"
- ]
- }
- },
- {
- "id": 8,
- "index": 6,
- "parentId": 6,
- "type": 0,
- "option": 2,
- "title": "点击»",
- "sequence": [],
- "isInLoop": true,
- "position": 1,
- "parameters": {
- "history": 4,
- "tabIndex": -1,
- "useLoop": true,
- "xpath": "",
- "iframe": false,
- "wait": 2,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0,
- "scrollType": 0,
- "scrollCount": 1,
- "scrollWaitTime": 1,
- "clickWay": 0,
- "maxWaitTime": 10,
- "paras": [],
- "alertHandleType": 0,
- "allXPaths": [
- "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]",
- "//a[contains(., '»')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"
- ],
- "loopType": 0
- }
- },
- {
- "id": 7,
- "index": 7,
- "parentId": 6,
- "type": 1,
- "option": 8,
- "title": "循环采集数据",
- "sequence": [8],
- "isInLoop": true,
- "position": 0,
- "parameters": {
- "history": 4,
- "tabIndex": -1,
- "useLoop": false,
- "xpath": "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr",
- "iframe": false,
- "wait": 0,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0,
- "scrollType": 0,
- "scrollCount": 1,
- "scrollWaitTime": 1,
- "loopType": 1,
- "pathList": "",
- "textList": "",
- "code": "",
- "waitTime": 0,
- "exitCount": 0,
- "historyWait": 2,
- "breakMode": 0,
- "breakCode": "",
- "breakCodeWaitTime": 0,
- "allXPaths": [
- "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]",
- "//tr[contains(., '震级(M)发震时刻(')]",
- "//TR[@class='speed-tr-h1']",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"
- ]
- }
- },
- {
- "id": 9,
- "index": 8,
- "parentId": 7,
- "type": 0,
- "option": 3,
- "title": "提取数据",
- "sequence": [],
- "isInLoop": true,
- "position": 0,
- "parameters": {
- "history": 4,
- "tabIndex": -1,
- "useLoop": false,
- "xpath": "",
- "iframe": false,
- "wait": 0,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0,
- "clear": 0,
- "newLine": 1,
- "paras": [
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数1_文本",
- "desc": "",
- "relativeXPath": "/td[eval(\"self.test()\")]",
- "allXPaths": [
- "/td[1]",
- "//td[contains(., '3.7')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"
- ],
- "exampleValues": [{ "num": 0, "value": "3.7" }],
- "unique_index": "/td[1]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数2_文本",
- "desc": "",
- "relativeXPath": "/td[2]",
- "allXPaths": [
- "/td[2]",
- "//td[contains(., '2023-11-30')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"
- ],
- "exampleValues": [{ "num": 0, "value": "2023-11-3003:44:10" }],
- "unique_index": "/td[2]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数3_文本",
- "desc": "",
- "relativeXPath": "/td[3]",
- "allXPaths": [
- "/td[3]",
- "//td[contains(., '37.53')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"
- ],
- "exampleValues": [{ "num": 0, "value": "37.53" }],
- "unique_index": "/td[3]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数4_文本",
- "desc": "",
- "relativeXPath": "/td[4]",
- "allXPaths": [
- "/td[4]",
- "//td[contains(., '112.47')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"
- ],
- "exampleValues": [{ "num": 0, "value": "112.47" }],
- "unique_index": "/td[4]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数5_文本",
- "desc": "",
- "relativeXPath": "/td[5]",
- "allXPaths": [
- "/td[5]",
- "//td[contains(., '28')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"
- ],
- "exampleValues": [{ "num": 0, "value": "28" }],
- "unique_index": "/td[5]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 1,
- "contentType": 0,
- "relative": true,
- "name": "参数6_链接文本",
- "desc": "",
- "relativeXPath": "/td[6]/a[1]",
- "allXPaths": [
- "/td[6]/a[1]",
- "//a[contains(., '山西太原市清徐县')]",
- "id(\"cid\")",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"
- ],
- "exampleValues": [{ "num": 0, "value": "山西太原市清徐县" }],
- "unique_index": "/td[6]/a[1]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 2,
- "contentType": 0,
- "relative": true,
- "name": "参数7_链接地址",
- "desc": "",
- "relativeXPath": "/td[6]/a[1]",
- "allXPaths": [
- "/td[6]/a[1]",
- "//a[contains(., '山西太原市清徐县')]",
- "id(\"cid\")",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"
- ],
- "exampleValues": [
- {
- "num": 0,
- "value": "https://news.ceic.ac.cn/CC20231130034410.html"
- }
- ],
- "unique_index": "/td[6]/a[1]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数8_文本",
- "desc": "",
- "relativeXPath": "/th[1]",
- "allXPaths": [
- "/th[1]",
- "//th[contains(., '震级(M)')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"
- ],
- "exampleValues": [{ "num": 1, "value": "震级(M)" }],
- "unique_index": "/th[1]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数9_文本",
- "desc": "",
- "relativeXPath": "/th[2]",
- "allXPaths": [
- "/th[2]",
- "//th[contains(., '发震时刻(UTC+8')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"
- ],
- "exampleValues": [{ "num": 1, "value": "发震时刻(UTC+8)" }],
- "unique_index": "/th[2]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数10_文本",
- "desc": "",
- "relativeXPath": "/th[3]",
- "allXPaths": [
- "/th[3]",
- "//th[contains(., '纬度(°)')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"
- ],
- "exampleValues": [{ "num": 1, "value": "纬度(°)" }],
- "unique_index": "/th[3]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数11_文本",
- "desc": "",
- "relativeXPath": "/th[4]",
- "allXPaths": [
- "/th[4]",
- "//th[contains(., '经度(°)')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"
- ],
- "exampleValues": [{ "num": 1, "value": "经度(°)" }],
- "unique_index": "/th[4]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数12_文本",
- "desc": "",
- "relativeXPath": "/th[5]",
- "allXPaths": [
- "/th[5]",
- "//th[contains(., '深度(千米)')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"
- ],
- "exampleValues": [{ "num": 1, "value": "深度(千米)" }],
- "unique_index": "/th[5]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- },
- {
- "nodeType": 0,
- "contentType": 1,
- "relative": true,
- "name": "参数13_文本",
- "desc": "",
- "relativeXPath": "/th[6]",
- "allXPaths": [
- "/th[6]",
- "//th[contains(., '参考位置')]",
- "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"
- ],
- "exampleValues": [{ "num": 1, "value": "参考位置" }],
- "unique_index": "/th[6]",
- "iframe": false,
- "default": "",
- "paraType": "text",
- "recordASField": 1,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "JS": "",
- "JSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "downloadPic": 0
- }
- ],
- "loopType": 1
- }
- },
- {
- "id": 5,
- "index": 9,
- "parentId": 2,
- "type": 0,
- "option": 5,
- "title": "自定义操作",
- "sequence": [],
- "isInLoop": true,
- "position": 2,
- "parameters": {
- "history": 1,
- "tabIndex": 0,
- "useLoop": false,
- "xpath": "",
- "iframe": false,
- "wait": 0,
- "waitType": 0,
- "beforeJS": "",
- "beforeJSWaitTime": 0,
- "afterJS": "",
- "afterJSWaitTime": 0,
- "waitElement": "",
- "waitElementTime": 10,
- "waitElementIframeIndex": 0,
- "clear": 0,
- "newLine": 1,
- "codeMode": "5",
- "code": "def test():\n a = 1\n print(\"AMESSAGE:\",a)\n return a\nself.test =test",
- "waitTime": 0,
- "recordASField": 0,
- "paraType": "text"
- }
- }
- ]
-}
+{"id":237,"name":"EXEC自定义函数示例:中国地震台网——历史查询","url":"https://www.ceic.ac.cn/history","links":"https://www.ceic.ac.cn/history","create_time":"12/9/2023, 3:36:47 AM","update_time":"12/11/2023, 4:27:41 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"k","containJudge":false,"desc":"https://www.ceic.ac.cn/history","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.ceic.ac.cn/history","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.ceic.ac.cn/history"},{"id":1,"name":"loopText_1","nodeId":2,"nodeName":"循环","desc":"要输入的文本/网址,多行以\\n分开","type":"text","exampleValue":"15\n25\n35","value":"15\n25\n35"},{"id":2,"name":"loopTimes_循环点击单个元素_2","nodeId":5,"nodeName":"循环点击单个元素","desc":"循环循环点击单个元素执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"exampleValue":"参考位置"},{"id":13,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0},"isInLoop":false},{"id":1,"index":1,"parentId":0,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":false,"position":0,"parameters":{"useLoop":false,"xpath":"","wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://www.ceic.ac.cn/history","links":"https://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3,4,9,5],"isInLoop":false,"position":1,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":"3","pathList":"","textList":"15\n25\n35","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0}},{"id":3,"index":3,"parentId":2,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"//*[@id=\"weidu1\"]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"1","index":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]","//input[contains(., '')]","id(\"weidu1\")","//INPUT[@class='span1']","//INPUT[@name='weidu1']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"id":4,"index":4,"parentId":2,"type":0,"option":2,"title":"点击查询","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"search\"]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"paras":[],"alertHandleType":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]","//a[contains(., '查询')]","id(\"search\")","//A[@class='check']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":6,"index":5,"parentId":2,"type":1,"option":8,"title":"循环点击单个元素","sequence":[7,6],"isInLoop":true,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[last()-1]/a[1]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":8,"index":6,"parentId":6,"type":0,"option":2,"title":"点击»","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"paras":[],"alertHandleType":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":7,"index":7,"parentId":6,"type":1,"option":8,"title":"循环采集数据","sequence":[8],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]","//tr[contains(., '震级(M)发震时刻(')]","//TR[@class='speed-tr-h1']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":9,"index":8,"parentId":7,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[eval(\"self.test()\")]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"arguments[0].innerText = \"123\"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":5,"index":9,"parentId":2,"type":0,"option":5,"title":"自定义操作","sequence":[],"isInLoop":true,"position":2,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"codeMode":"5","code":"def test():\n a = 1\n print(\"AMESSAGE:\",a)\n return a\nself.test =test","waitTime":0,"recordASField":0,"paraType":"text"}}]}
\ No newline at end of file
diff --git a/Extension/manifest_v3/src/content-scripts/messageInteraction.js b/Extension/manifest_v3/src/content-scripts/messageInteraction.js
index 5f877b4..722678b 100644
--- a/Extension/manifest_v3/src/content-scripts/messageInteraction.js
+++ b/Extension/manifest_v3/src/content-scripts/messageInteraction.js
@@ -229,7 +229,7 @@ function createNotification(text, type="info") {
setInterval(function () {
let notifications = document.getElementsByClassName("notification_of_easyspider");
for (let i = 0; i < notifications.length; i++) {
- if (new Date().getTime() - parseInt(notifications[i].getAttribute("data-timestamp")) > 10000) {
+ if (new Date().getTime() - parseInt(notifications[i].dataset.timestamp) > 10000) {
if (notifications[i].parentNode === document.body) {
document.body.removeChild(notifications[i]); // 避免移除已经不存在的元素
}