public static string Host(bool withhttp = true)
{
string pattern = "([a-z]+://[^/]+)/.*";
if (!withhttp)
pattern = "[a-z]+://([^/]+)/.*";
string replacement = "$1";
Regex rgx = new Regex(pattern);
string result = rgx.Replace(WebDriver.Url, replacement);
return result;
}