Пример #1
0
 public void Listener(By by)
 {
     try
     {
         Task.Factory.StartNew(() =>
         {
             _logger.LogInfo(string.Format("Listener running, looking for element(s) [{0}] for every [{1}]  milliseconds", by, intervalInmilliseconds));
             while (_driver != null)
             {
                 try
                 {
                     foreach (var element in _findManager.Finds(by))
                     {
                         element.Click();
                     }
                 }
                 catch (Exception)
                 {
                     //ignore Exception
                     Thread.Sleep(intervalInmilliseconds);
                 }
             }
         });
     }
     catch (Exception e)
     {
         _logger.LogError(e.ToString());
         throw;
     }
 }
Пример #2
0
 protected List <IWebElement> Finds(By by)
 {
     return(_findManager.Finds(by));
 }