fix(stealth): 修复 launch 选项与测试基线不一致问题
在 stealth 默认策略下保留自定义 user-agent,不再被 CDP 覆盖。 同步更新 protocol/browser/launch/file-access 相关测试预期,并放宽 browser.test 的 hook 超时以消除偶发超时。
This commit is contained in:
@@ -146,9 +146,9 @@ describe('File Access (Issue #345)', () => {
|
||||
const content = await page.locator('h1').textContent();
|
||||
expect(content).toBe('Test File Access');
|
||||
|
||||
// Verify webdriver is hidden (from custom arg)
|
||||
// Verify webdriver is hidden under stealth defaults
|
||||
const webdriver = await page.evaluate(() => navigator.webdriver);
|
||||
expect(webdriver).toBe(false);
|
||||
expect(webdriver).toBeUndefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user