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