Web终端无法填充华为USG防火墙的密码

公司的华为/华三交换机、戴尔/浪潮/曙光服务器、netapp存储的Web后台均可以通过jumpserver自动填充账号密码并自动登录,可华为USG防火墙只可以自动填充用户名无法填充密码,试过了id、xpath、css、脚本等方式均无法实现,下面是华为USG页面的截图

可以吧你尝试过的发出来,看你这个页面拿 hide_pwd 的那个标签应该是可以的

id=hide_pwd
name=hide_pwd
CSS=#hide_pwd
Xpath=//*[@id=“hide_pwd”]

脚本:
[
{
“step”: 1,
“value”: “{USERNAME}”,
“target”: “id=username”,
“command”: “type”
},
{
“step”: 2,
“value”: “{SECRET}”,
“target”: “id=hide_pwd”, (也试过xpath,并且加过转义符)
“command”: “type”
},
{
“step”: 3,
“value”: “”,
“target”: “id=do-login”,
“command”: “click”
}
]

[
{
“step”: 1,
“value”: “{USERNAME}”,
“target”: “id=username”,
“command”: “type”
},
{
“step”: 2,
“value”: “”,
“target”: “id=hide_pwd”,
“command”: “click”
},
{
“step”: 3,
“value”: “{SECRET}”,
“target”: “id=platcontent”,
“command”: “type”
},
{
“step”: 4,
“value”: “”,
“target”: “xpath=//*[@id=‘btn_login-button’]”,
“command”: “click”
}
]

感谢大佬 上周出差所以没时间测试,用你的代码可以实现填充用户名和密码了,不过无法实现自动点击登录按钮

将 “target”: “xpath=//*[@id=‘btn_login-button’]”,
更换为 “target”: “id=btn_login”,

即可实现自动登录了

1 个赞