We can close our browser using Process. See the following code
using System.Diagnostics;
Process[] AllProcesses = Process.GetProcesses();
foreach (var process in AllProcesses)
{
if (process.MainWindowTitle != "")
{
string s = process.ProcessName.ToLower();
if (s == "iexplore" || s == "iexplorer" || s == "chrome" || s == "firefox" )
process.Kill();
}
}