【发布时间】:2026-01-20 22:25:01
【问题描述】:
我计划为我的 CEF 应用程序构建集成测试。集成测试将专注于验证应用程序的 UI。我认为可能有两种方法可以做到:
1. Use Selenium/webdriver + chromedriver: Selenium talks to chromedriver through
webdriver protocol, and chromedriver talks to my CEF application through
Chrome Devtools Protocol
2. Use Puppeteer or similar library that talks to CEF application directly
through Chrome Devtools Protocol
首先,Puppeteer 有没有办法连接到远程 chrome 调试器?大多数用例似乎是在 Puppeteer 中启动无头 chrome,这不是我想要的。
如果两个选项都可行,您更喜欢哪个选项? Puppeteer 似乎具有比 Selenium 更丰富的功能来测试实现 Chrome Devtools 协议的用户代理。 Selenium/webdriver 的跨平台优势似乎与测试 CEF 应用程序无关。
【问题讨论】:
标签: selenium-webdriver selenium-chromedriver integration-testing puppeteer chromium-embedded