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