public void Execute(Arguments arguments)
 {
     try
     {
         SeleniumWrapper wrapper = SeleniumManager.CreateWrapper(
             arguments.Type.Value,
             "https://play.google.com/store/apps/details?id=io.chingari.app",
             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[4]/c-wiz/div/div[2]/div/div/main/c-wiz[1]/c-wiz[1]/div/div[2]/div/div[2]/div/div[2]/div/c-wiz/c-wiz/div/span/button";
         arguments.By.Value     = "xpath";
         SeleniumManager.CurrentWrapper.Click(arguments, arguments.Timeout.Value);
         arguments.Search.Value = "/html/body/div/div/div[2]/div[3]/span/button";
         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);
     }
 }
예제 #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);
     }
 }
예제 #3
0
 public void Execute(Arguments arguments)
 {
     try
     {
         SeleniumWrapper wrapper = SeleniumManager.CreateWrapper(
             arguments.Type.Value,
             "https://chingari.io/trending",
             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);
     }
 }