Chromedriver:如何禁用Google Chrome浏览器帮助器

Exp*_*ode 6 python macos selenium-chromedriver selenium-webdriver

我在Mac上运行10个chromedriver浏览器,每个浏览器都使用1个标签,但是以某种方式产生了98个Google Chrome浏览器帮助程序。这些助手正在消耗我的可用内存,并严重限制了我可以在其上运行这些测试的硬件。

互联网似乎已经达成共识,可以通过转到/ settings / content settings / plugins,然后选择“点击播放”选项来禁用google chrome helper。

However, that option does not appear to exist in the current version of chrome. Instead the three options are:

Run all plugin content 
Detect and run important plugin content
Let me choose when to run plugin content (which is assume is the equivalent)
Run Code Online (Sandbox Code Playgroud)

To attempt to get the latter option as my default setting I created a blank folder, then ran this in the terminal

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/Users/User/Documents/Python/chome_helper_blank_folder
Run Code Online (Sandbox Code Playgroud)

I can confirm the settings I change in this instance stick, and opening up a new instance in this fashion launches with the settings I last established.

I am getting this error on launch, but it doesn't appear to be affecting :

2016-08-23 08:55:48.149 Google Chrome[556:16791] NSWindow warning: adding an unknown subview: <FullSizeContentView: 0x7fc703e84f80>. Break on NSLog to debug.
2016-08-23 08:55:48.149 Google Chrome[556:16791] Call stack:
(
    "+callStackSymbols disabled for performance reasons"
(
Run Code Online (Sandbox Code Playgroud)

In addition to the above setting, I navigated to

 chrome://plugins/
Run Code Online (Sandbox Code Playgroud)

and disabled the 4 plugins displaying.

Unfortunately, 3 chrome helpers per browser still appear at browser launch.

When I use the following python commands, chrome launches with the settings I established above, but the chrome helpers are still there as well.

chome_helper_blank_folder_path = "/Users/User/Documents/Python/chome_helper_blank_folder"
chrome_options = Options()
chrome_options.add_argument("user-data-dir="+chome_helper_blank_folder_path)
driver = webdriver.Chrome(chrome_options=chrome_options)
Run Code Online (Sandbox Code Playgroud)

Is there any way to get rid of google chrome helper with chromedriver?