modified: .vscode/launch.json
new file: deepseek_html_20250425_ef9a56.html modified: src/content/content.js modified: .vscode/launch.json new file: deepseek_html_20250425_ef9a56.html modified: src/content/content.js modified: .vscode/launch.json modified: src/content/content.js deepseek_html_20250427_d3f472.html
This commit is contained in:
parent
1ec7ab7d65
commit
042d7b57fe
|
@ -10,7 +10,7 @@
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"reAttach": true,
|
"reAttach": true,
|
||||||
"addonPath": "${workspaceFolder}//src",
|
"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"
|
"firefoxExecutable": "D:\\Program Files\\Mozilla Firefox\\firefox.exe"
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>编辑保护按钮</title>
|
||||||
|
<style>
|
||||||
|
/* Ant Design 按钮基础样式 */
|
||||||
|
.ant-btn {
|
||||||
|
line-height: 1.499;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 400;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all .3s cubic-bezier(.645, .045, .355, 1);
|
||||||
|
user-select: none;
|
||||||
|
touch-action: manipulation;
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
background-color: #fff;
|
||||||
|
border-color: #d9d9d9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-btn-primary {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #1890ff;
|
||||||
|
border-color: #1890ff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
|
||||||
|
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-btn-primary:hover {
|
||||||
|
background-color: #40a9ff;
|
||||||
|
border-color: #40a9ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-btn-primary:active {
|
||||||
|
background-color: #096dd9;
|
||||||
|
border-color: #096dd9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-btn[disabled] {
|
||||||
|
color: rgba(0, 0, 0, 0.25);
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-color: #d9d9d9;
|
||||||
|
text-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button style="border-radius: 2px 0px 0px 2px;" type="button" class="ant-btn ant-btn-primary"
|
||||||
|
id="cdp_diskInfo_editConfigProtect_button" robotid="cdp_diskInfo_editCfgProtect">
|
||||||
|
编辑保护
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const button = document.getElementById('cdp_diskInfo_editConfigProtect_button');
|
||||||
|
|
||||||
|
button.addEventListener('click', function() {
|
||||||
|
alert('已经点击');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -924,6 +924,10 @@ function addAllXpathAttributesBbased(attribute, tagName, element) {
|
||||||
let id = getIdBasedXpath(element, tagName)
|
let id = getIdBasedXpath(element, tagName)
|
||||||
if (id != null) { xpathArray.push([1, 'Id is unique:', id]) };
|
if (id != null) { xpathArray.push([1, 'Id is unique:', id]) };
|
||||||
break;
|
break;
|
||||||
|
case 'robotid':
|
||||||
|
let robotid = getRobotIdBasedXpath(item, tagName)
|
||||||
|
if (robotid != null) { xpathArray.push([1, 'RobotId is unique:', robotid]) };
|
||||||
|
break;
|
||||||
case 'class':
|
case 'class':
|
||||||
let className = getClassBasedXpath(element, tagName)
|
let className = getClassBasedXpath(element, tagName)
|
||||||
if (className != null) { xpathArray.push([3, 'Class based XPath', className]) }
|
if (className != null) { xpathArray.push([3, 'Class based XPath', className]) }
|
||||||
|
@ -1248,6 +1252,12 @@ function getIdBasedXpath(element, tagName) {
|
||||||
}
|
}
|
||||||
return idBasedXpath;
|
return idBasedXpath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getRobotIdBasedXpath(element) {
|
||||||
|
let clicketItemId = element.value;
|
||||||
|
return clicketItemId;
|
||||||
|
}
|
||||||
|
|
||||||
// To get class based xpath
|
// To get class based xpath
|
||||||
function getClassBasedXpath(element, tagName) {
|
function getClassBasedXpath(element, tagName) {
|
||||||
let classBasedXpath = null;
|
let classBasedXpath = null;
|
||||||
|
|
Loading…
Reference in New Issue