📜  什么是无头浏览器测试 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:19.049000             🧑  作者: Mango

代码示例1
Headless browser is a browser that does not open, it runs as a background 
program.

I can do headless testing. One option in the runner class there is Dry 
keyword within the Cucumber Options. I make it “true” and run headless 
browser testing. 

The another way; I have a driver class that can open different
browsers including headless browsers: 
case "chromeHeadless":
        WebDriverManager.chromedriver().setup();
        driver = new Chromedriver(new ChromeOptions().setHeadless(true))