.net - Close one tab in chrome using C# -


I can close all tabs in Chrome by using the process like this:

  Process [] chromeInstances = Process Get ProcessByName ("Chrome"); If (chromeInstances.Length & gt; 0) {foreach (process p in chromeInstances) {p.Kill (); ; }}  

But I want to close a tab in Chrome. it's possible?

According to this post, it is not possible:

Can not close a tab by killing the process. The process shows a renderer that executes the main browser and draws a page, which makes it a copy on the screen. "Oh, snap!" It is the browser that displays when the renderer is responsible for that tab, or it is killed, the proper way of closing the tab is ideally done through the command line switch, but no one knows at this time.

In addition, the description of the comment,


Comments