google-chrome - 如何在 Selenium 自动化测试中使用 puppeteer 进行 headless Chrome

标签 google-chrome selenium selenium-webdriver ui-automation puppeteer

如果有人知道什么是 puppeteer 以及如何在 headless chrome 的 selenium 自动化中使用它,请指导我。

以下是 puppeteer 师的链接。

https://github.com/GoogleChrome/puppeteer

1) 我可以将它与 Java 语言一起用于自动化测试吗?

2)使用这个有什么用?

我是这个 puppeteer 的新手,我想在我的基于 java 和 selenium 的项目中使用它。

最佳答案

Puppeteer 是仅在 Chrome 上运行的 selenium 的替代品。不可能从 selenium 运行 puppeteer。 Puppeteer 专为 chrome 设计,仅在 Node.js 环境中运行。如果您有兴趣从 selenium 运行 chrome headless 这个 thread可能对你很有值(value)。

关于google-chrome - 如何在 Selenium 自动化测试中使用 puppeteer 进行 headless Chrome ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46791348/

相关文章:

javascript - 当我动态设置内容时,TinyMCE 无法与 Chrome 一起使用

javascript - 我怎样才能在 chrome 扩展中播放声音

java - 在 build.gradle 中为 Selenium 测试程序定义 WebDriver 路径,而不是以编程方式设置系统属性

javascript - 在 Selenium WebDriverJS 中使用 getWindowHandles 时出错

java - 如何设置热键? - Chrome 驱动程序。 java 。

google-chrome - 如何防止在 chrome 扩展中缓存资源?

java - selenium 找不到合适的方法,直到(ExpectedCondition<WebElement>)

java - 页面对象模式设计

Selenium 学习循序渐进

java - org.openqa.selenium.NoSuchElementException