From d3d9a73f05b31fe72d85ff9ebbc008c666556b3a Mon Sep 17 00:00:00 2001 From: jenkins Date: Sun, 27 Apr 2025 20:18:14 +0800 Subject: [PATCH] modified: .vscode/launch.json new file: deepseek_html_20250425_ef9a56.html modified: src/content/content.js --- .vscode/launch.json | 2 +- deepseek_html_20250425_ef9a56.html | 76 ++++++++++++++++++++++++++++++ src/content/content.js | 10 ++++ 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 deepseek_html_20250425_ef9a56.html diff --git a/.vscode/launch.json b/.vscode/launch.json index e2fd4b5..0979faa 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "reAttach": true, "addonPath": "${workspaceFolder}//src", - "url": "file:///E:/git-code/rutoxpath-6.0.1/Downloads/BlackCube.htm", + "url": "file://${workspaceFolder}/deepseek_html_20250425_ef9a56.html", "firefoxExecutable": "D:\\Program Files\\Mozilla Firefox\\firefox.exe" } // { diff --git a/deepseek_html_20250425_ef9a56.html b/deepseek_html_20250425_ef9a56.html new file mode 100644 index 0000000..b46ba90 --- /dev/null +++ b/deepseek_html_20250425_ef9a56.html @@ -0,0 +1,76 @@ + + + + + + 编辑保护按钮 + + + + + + + + \ No newline at end of file diff --git a/src/content/content.js b/src/content/content.js index 4fc27a1..77f5d73 100644 --- a/src/content/content.js +++ b/src/content/content.js @@ -924,6 +924,10 @@ function addAllXpathAttributesBbased(attribute, tagName, element) { let id = getIdBasedXpath(element, tagName) if (id != null) { xpathArray.push([1, 'Id is unique:', id]) }; break; + case 'robotid': + let robotid = getRobotIdBasedXpath(item, tagName) + if (robotid != null) { xpathArray.push([1, 'RobotId is unique:', robotid]) }; + break; case 'class': let className = getClassBasedXpath(element, tagName) if (className != null) { xpathArray.push([3, 'Class based XPath', className]) } @@ -1248,6 +1252,12 @@ function getIdBasedXpath(element, tagName) { } return idBasedXpath; } + +function getRobotIdBasedXpath(element) { + let clicketItemId = element.value; + return clicketItemId; +} + // To get class based xpath function getClassBasedXpath(element, tagName) { let classBasedXpath = null;