public void Execute(Arguments arguments)
 {
     try
     {
         SeleniumWrapper wrapper = SeleniumManager.CreateWrapper(
             arguments.Type.Value,
             "pinterest.com",
             arguments.Timeout.Value,
             false,
             Scripter.Log,
             Scripter.Settings.UserDocsAddonFolder.FullName);
         int wrapperId = wrapper.Id;
         OnScriptEnd = () =>
         {
             SeleniumManager.DisposeAllOpenedDrivers();
             SeleniumManager.RemoveWrapper(wrapperId);
             SeleniumManager.CleanUp();
         };
     }
     catch (Exception ex)
     {
         throw new ApplicationException($"Error occured while opening new selenium instance. Message: {ex.Message}", ex);
     }
 }
Example #2
0
 public static void RemoveWrapper(SeleniumWrapper wrapper)
 {
     wrappers.Remove(wrapper);
     wrapper = null;
 }
Example #3
0
 public static void Quit(SeleniumWrapper wrapper)
 {
     wrapper.Quit();
     RemoveWrapper(wrapper);
 }