【发布时间】:2021-03-18 12:14:28
【问题描述】:
我试图让我的测试忽略“站点正在使用不安全的连接”的 chrome 警告消息。
我需要设置什么才能让 webdriver 忽略这个,或者设置 chrome 选项。目前它只是设置为无头。
ChromeOptions co = new ChromeOptions(); co.addArguments("headless","disable-gpu");
我尝试过--allow-running-insecure-content,但这似乎不起作用。
【问题讨论】:
-
你使用什么语言来运行 selenium? C#?
-
鉴于
addArguments是用驼峰命名的,我猜java。 -
@Jortega 我正在使用 java
-
所以我知道在 chrome 中我可以在站点设置禁用不安全内容下禁用它,但我想在驱动程序中禁用它。 “allow-running-insecure-content”应该可以工作......但它似乎不起作用
标签: selenium google-chrome webdriver chrome-web-driver