fix: 网页监听通配过滤去锚定(关键字任意位置命中), 网址下载临时锚点改可见1px触发(隐藏元素被点击解析过滤), 浏览器截图path传目录自动补文件名, 补网页自动化真实Chrome冒烟11项
This commit is contained in:
1 parent
58aae7c92f
commit
fb71c0551b
3 files changed
+255
-3
No files matched your search
@@ -1009,8 +1009,9 @@ export class BrowserSession implements BrowserLike {
|
||||
}
|
||||
if (options.url) {
|
||||
const keyword = options.url;
|
||||
// wildcard 语义是「关键字可出现在 URL 任意位置,* 匹配任意片段」,不加 ^$ 锚定
|
||||
captures = options.wildcard
|
||||
? captures.filter(c => new RegExp("^" + keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*")).test(c.url))
|
||||
? captures.filter(c => new RegExp(keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*")).test(c.url))
|
||||
: captures.filter(c => c.url.includes(keyword));
|
||||
}
|
||||
const result: Array<Record<string, unknown>> = [];
|
||||
|
||||
Reference in new issue
Block a user