[英]After test:report:chrome Report generation done, Terminal not closing the instance, it keeps running
I am using protector, selenium for running the UI automation.我正在使用保护器 selenium 来运行 UI 自动化。
For chrome driver I am using webdriver-manager for testing the UI Automation.对于 chrome 驱动程序,我使用 webdriver-manager 来测试 UI 自动化。 It run successfully, browser also close but it keeps running the terminal instance can anyone help me on this?
它运行成功,浏览器也关闭了,但它一直在运行终端实例,有人可以帮我吗?
config.directConnect = false;
config.seleniumAddress = "http://127.0.0.1:4444/wd/hub";
config.capabilities.chromeOptions = chromeOptions = {
args: [
"--no-sandbox",
"--disable-infobars",
"--disable-dev-shm-usage",
"--disable-extensions",
"--log-level=3",
"--disable-gpu",
"--start-maximized"
].concat(isCI ? ["--headless"] : []), // run in headless mode on the CI server
prefs: {
"download.default_directory": downloadDir
}
};
config.serenity = {
outputDirectory: `${process.cwd()}/test_reports_chrome`,
runner: "cucumber",
crew: [
ArtifactArchiver.storingArtifactsAt("./test_reports_chrome"),
ConsoleReporter.forDarkTerminals(),
Photographer.whoWill(TakePhotosOfInteractions), // or Photographer.whoWill(TakePhotosOfFailures),
new SerenityBDDReporter()
]
you should add -r
for script in package.json您应该在 package.json 中为脚本添加
-r
"test:chrome": "npm-run-all -p -r webdriver:chrome execute:chrome",
-p
= Run commands in parallel. -p
= 并行运行命令。
-r
= Kill all commands when one of them finishes with zero. -r
= 当其中一个以零结束时终止所有命令。
Running npm run test:chrome
will start Selenium driver, start http server (to serve you files) and run protractor tests.运行
npm run test:chrome
将启动 Selenium 驱动程序,启动 http 服务器(为您提供文件)并运行量角器测试。 Once all tests are finished, it will close the http server and the selenium driver.完成所有测试后,它将关闭 http 服务器和 selenium 驱动程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.