public void Execute(Arguments arguments)
        {
            try
            {
                SeleniumWrapper wrapper = SeleniumManager.CreateWrapper(
                    "chrome",
                    "https://teams.webex.com/calls",
                    arguments.Timeout.Value,
                    false,
                    Scripter.Log,
                    Scripter.Settings.UserDocsAddonFolder.FullName);
                int wrapperId = wrapper.Id;
                OnScriptEnd = () =>
                {
                    SeleniumManager.DisposeAllOpenedDrivers();
                    SeleniumManager.RemoveWrapper(wrapperId);
                    SeleniumManager.CleanUp();
                };
                arguments.Search.Value = "/html/body/main/div/div[1]/div[4]/div[1]/nav/ul/li[3]/button/span";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.Click(arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/main/div/div[1]/div[4]/div[2]/div[2]/div[2]/div[1]/div/div/div/input";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.TypeText(arguments.phone.Value, arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/main/div/div[1]/div[4]/div[2]/div[2]/div[2]/button/span";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.Click(arguments, arguments.Timeout.Value);
            }
            catch (Exception ex)
            {
                throw new ApplicationException($"Error occured while opening new selenium instance. Message: {ex.Message}", ex);
            }
        }
        public void Execute(Arguments arguments)
        {
            try
            {
                SeleniumWrapper wrapper = SeleniumManager.CreateWrapper(
                    "chrome",
                    "https://meetingsapac35.webex.com/webappng/sites/meetingsapac35/insight/home",
                    arguments.Timeout.Value,
                    false,
                    Scripter.Log,
                    Scripter.Settings.UserDocsAddonFolder.FullName);
                int wrapperId = wrapper.Id;
                OnScriptEnd = () =>
                {
                    SeleniumManager.DisposeAllOpenedDrivers();
                    SeleniumManager.RemoveWrapper(wrapperId);
                    SeleniumManager.CleanUp();
                };
                arguments.Search.Value = "/html/body/div[1]/div[3]/div/div/div[3]/div[1]/div[2]/div[2]/a/div/a";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.Click(arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/ul/li[3]/a";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.Click(arguments, arguments.Timeout.Value);
            }
            catch (Exception ex)
            {
                throw new ApplicationException($"Error occured while opening new selenium instance. Message: {ex.Message}", ex);
            }
        }
예제 #3
0
 public void Execute(Arguments arguments)
 {
     try
     {
         SeleniumWrapper wrapper = SeleniumManager.CreateWrapper(
             arguments.Type.Value,
             arguments.Url?.Value,
             arguments.Timeout.Value,
             arguments.NoWait.Value,
             Scripter.Log,
             Scripter.Settings.UserDocsAddonFolder.FullName);
         int wrapperId = wrapper.Id;
         OnScriptEnd = () =>
         {
             SeleniumManager.DisposeAllOpenedDrivers();
             SeleniumManager.RemoveWrapper(wrapperId);
             SeleniumManager.CleanUp();
         };
         Scripter.Variables.SetVariableValue(arguments.Result.Value, new IntegerStructure(wrapper.Id));
     }
     catch (DriverServiceNotFoundException ex)
     {
         throw new ApplicationException("Driver not found", ex);
     }
     catch (Exception ex)
     {
         throw new ApplicationException($"Error occured while opening new selenium instance. Url '{arguments.Url.Value}'. Message: {ex.Message}", ex);
     }
 }
        public void Execute(Arguments arguments)
        {
            try
            {
                SeleniumWrapper wrapper = SeleniumManager.CreateWrapper(
                    "chrome",
                    "https://meetingsapac35.webex.com/webappng/sites/meetingsapac35/dashboard/home",
                    arguments.Timeout.Value,
                    false,
                    Scripter.Log,
                    Scripter.Settings.UserDocsAddonFolder.FullName);
                int wrapperId = wrapper.Id;
                OnScriptEnd = () =>
                {
                    SeleniumManager.DisposeAllOpenedDrivers();
                    SeleniumManager.RemoveWrapper(wrapperId);
                    SeleniumManager.CleanUp();
                };
                arguments.Search.Value = "/html/body/div[1]/div[3]/div/div/div[4]/div[1]/div/div[1]/div[1]/div[1]/div/div[2]/button";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.Click(arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/div[1]/div[3]/div/div/div[4]/div[1]/div/div/div/section/form/div[2]/div/div/input";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.TypeText(arguments.info.Value, arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/div[1]/div[3]/div/div/div[4]/div[1]/div/div/div/section/form/div[4]/div/div[1]/a/span[1]";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.Click(arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/div[7]/span/div/div[1]/div/div/div[1]/div";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.TypeText(arguments.date.Value, arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/div[7]/span/div/div[2]/div[1]/div[1]/div[2]/input";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.TypeText(arguments.hour.Value, arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/div[7]/span/div/div[2]/div[1]/div[2]/div[2]/input";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.TypeText(arguments.minutes.Value, arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/div[7]/span/div/div[2]/div[3]/button";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.Click(arguments, arguments.Timeout.Value);

                arguments.Search.Value = "/html/body/div[1]/div[3]/div/div/div[4]/div[1]/div/div/div/section/form/div[9]/div/button[2]";
                arguments.By.Value     = "xpath";
                SeleniumManager.CurrentWrapper.Click(arguments, arguments.Timeout.Value);
            }
            catch (Exception ex)
            {
                throw new ApplicationException($"Error occured while opening new selenium instance. Message: {ex.Message}", ex);
            }
        }
 public void Execute(Arguments arguments)
 {
     try
     {
         SeleniumManager.QuitCurrentWrapper();
     }
     catch (Exception ex)
     {
         throw new ApplicationException($"Error occured while opening new selenium instance. Message: {ex.Message}", ex);
     }
 }