fix: zIndex auto coverage bug + monitor maxchars unlimit + autofill CDP sop update

This commit is contained in:
Liang Jiaqing
2026-03-07 10:10:26 +08:00
parent fd9f172588
commit 7ab47af8e8
2 changed files with 10 additions and 7 deletions

View File

@@ -69,10 +69,13 @@ document.body.appendChild(el); // 响应写回el.textContent
## autofill获取
检测web_scan输出input带`data-autofilled="true"`value显示为受保护提示(非真实值Chrome安全保护需点击释放)
- ⭐首选CDP batch一次完成tabs获tabId→mousePressed+mouseReleased点击**任一**输入框→全部autofill字段值释放→JS读`.value`
- ⚠点击一个autofill字段会释放页面上所有autofill字段的值无需逐个点击
-必须mousePressed+mouseReleased配对才算完整点击
- batch示例`{cmd:'batch',commands:[{cmd:'tabs'},{cmd:'cdp',tabId:'$0.0.id',method:'Input.dispatchMouseEvent',params:{type:'mousePressed',x:X,y:Y,button:'left',clickCount:1}},{cmd:'cdp',tabId:'$0.0.id',method:'Input.dispatchMouseEvent',params:{type:'mouseReleased',x:X,y:Y,button:'left',clickCount:1}}]}`
- ⭐首选CDP单次点击JS取任一autofill输入框坐标→CDP `Input.dispatchMouseEvent` mousePressed一次即可释放→JS读`.value`
- ⚠点击一个autofill字段会释放页面上**所有**autofill字段的值无需逐个点击
-只需mousePressed,不需要mouseReleased配对
- ⚠tabId当前注入页无需指定(默认sender.tab.id)跨tab才需显式tabId(整数)
- 示例(当前页)`{cmd:'cdp',method:'Input.dispatchMouseEvent',params:{type:'mousePressed',x:X,y:Y,button:'left',clickCount:1}}`
- 示例(跨tab):先`{cmd:'tabs'}`获取tabId(整数),再`{cmd:'cdp',tabId:N,method:'Input.dispatchMouseEvent',params:{...}}`
- ⚠batch的`$N.path`引用会将整数tabId转为字符串导致类型错误跨tab时建议分两次命令而非batch
- 备选PostMessage物理点击(仅Windows/需前台)枚举Chrome窗口标题匹配→rect*dpr→WM_LBUTTONDOWN/UP到Chrome_RenderWidgetHostHWND子窗口
-多RenderWidgetHostHWND共存必须按父窗口标题匹配再取子窗口