在量角器中运行测试用例后 Chrome 实例不会关闭 [英] Chrome Instances don't close after running Test Case in Protractor
本文介绍了在量角器中运行测试用例后 Chrome 实例不会关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我多次运行测试时,Chrome 实例不会因为 PC 利用率趋于 100% 而关闭.所以,我必须手动结束 Chrome 实例.有什么办法可以解决这个问题?
When I run the test multiple times so Chrome instances do not close due to which PC utilization tends to 100%. So, I have to end Chrome instances manually. There might be some way to handle this?
解决方案:
chromeOptions: {
args: ["--disable-gpu"]
},
在配置文件Disable-gpu"中负责在渲染出现问题时禁用 chrome 的加速(以防失败).
In Configuration file "Disable-gpu" is responsible to disable acceleration of chrome whenever there is some problem in rendering(in-case of failure).
推荐答案
另一个对我们公司每个人都有效的解决方案是从配置文件中删除 "--no-sandbox"
参数行看起来像这样
Another solution that has worked for everybody in our company was removing "--no-sandbox"
argument from config file from the line that looked like this
chromeOptionsArgs = ["incognito", "--window-size=1920,1080", "disable-extensions", "start-maximized", "--no-sandbox", "--test-type=browser"];
这篇关于在量角器中运行测试用例后 Chrome 实例不会关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文