本文介绍了谷歌浏览器(32位)多进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Chrome 中运行 2 个测试时,我发现任务管理器中运行了太多 Google Chrome(32 位)进程,这是 Chome 驱动程序的正确行为吗

解决方案

当通过 Google Chrome 执行多个自动化测试时,您一定已经观察到可能有几十个正在运行的 Google Chrome 进程数,可以通过 Windows 任务管理器的 Processes 选项卡观察.

快照:

根据文章

尾声

您可以在 如何使用 Python 退出所有通过 GeckoDriver 和 Selenium 启动的 Firefox 进程

When 2 tests are running in Chrome, i have observed that too many Google Chrome(32 Bit) processes are running in Task manager, Is this a correct behavior of Chome Driver

解决方案

When multiple automated tests are getting executed through Google Chrome you must have observed that there are potentially dozens of Google Chrome processes running which can be observed through Windows Task Manager's Processes tab.

Snapshot:

As per the article SOLVED: Why Google Chrome Has So Many Processes for a better user experience Google Chrome initiates a lot of windows background processes for each tab that have been opened by your Automated Tests. Google tries to keep the browser stable by separating each web page into as many processes as it deems fit to ensure that if one process fails on a page, that particular process(es) can be terminated or refreshed without needing to kill or refresh the entire page.


However, from 2018 onwards Google Chrome was actually redesigned to create a new process for each of the following entities:

  • Tab
  • HTML/ASP text on the page
  • Plugin those are loaded
  • App those are loaded
  • Frames within the page

In a Chromium Blog Multi-process Architecture it is mentioned:

As a conclusion, the many processes you are seeing is pretty much in line with the current implementation of


Outro

You can find a relevant discussion in How to quit all the Firefox processes which gets initiated through GeckoDriver and Selenium using Python

这篇关于谷歌浏览器(32位)多进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 04:29