Example #1
0
 // Implement this method
 public void Execute(Arguments arguments)
 {
     try
     {
         SeleniumWrapper wrapper = SeleniumManager.CreateWrapper(
             arguments.Type.Value,
             "https://zoom.us/",
             arguments.Timeout.Value,
             arguments.NoWait.Value,
             Scripter.Log,
             Scripter.Settings.UserDocsAddonFolder.FullName);
         int wrapperId = wrapper.Id;
         OnScriptEnd = () =>
         {
             SeleniumManager.DisposeAllOpenedDrivers();
             SeleniumManager.RemoveWrapper(wrapperId);
             SeleniumManager.CleanUp();
         };
         var len = SeleniumManager.CurrentWrapper.RunScript("return document.getElementsByClassName(\"captcha -internal\").length");
         if (len == "1")
         {
             RobotMessageBox.Show("Captcha detected, please solve the captcha");
         }
     }
     catch (Exception ex)
     {
         throw new ApplicationException($"Error occured while opening new selenium instance. Message: {ex.Message}", ex);
     }
 }
Example #2
0
 public void Execute(Arguments arguments)
 {
     try
     {
         SeleniumManager.QuitCurrentWrapper();
     }
     catch (Exception ex)
     {
         throw new ApplicationException($"Error occured while closing selenium instance. Message: {ex.Message}", ex);
     }
 }