public static BrowserInstance Get(BrowserType browser = BrowserType.Chrome) { if (_instance != null) { return(_instance); } return(_instance = Init(browser)); }
public void Kill() { if (_instance != null) { try { _instance.Driver.Quit(); } catch (Exception e) { //Logger.Error($"Cannot kill browser: {e.Message}"); } finally { _instance = null; } } }