Esempio n. 1
0
 /// <summary>
 /// Returns required sort label of IWebElement type for blinds sorting
 /// </summary>
 /// <param name="sortType"></param>
 /// <returns>IWebElement</returns>
 private IWebElement GetBlindsSortType(string sortType)
 {
     try
     {
         IList <IWebElement> BlindSortTypeList = BlindsSortLabelTab.FindElements(By.CssSelector(sortTypesCssSeletor));
         foreach (IWebElement BlindSortType in BlindSortTypeList)
         {
             if (BlindSortType.Text.Trim().ToLower().Equals(sortType.Trim().ToLower()))
             {
                 return(BlindSortType);
             }
         }
     }
     catch (Exception GetBlindsSortTypeException)
     {
         throw GetBlindsSortTypeException;
     }
     return(null);
 }
Esempio n. 2
0
 /// <summary>
 /// Gets Blinds sorted label
 /// </summary>
 /// <returns>string</returns>
 private string GetBlindsSortedType()
 {
     try
     {
         string AttributeValue;
         IList <IWebElement> BlindSortTypeList = BlindsSortLabelTab.FindElements(By.CssSelector(sortTypesCssSeletor));
         foreach (IWebElement BlindSortType in BlindSortTypeList)
         {
             if (TryIfGetAttributeValueSucceeds(BlindSortType, "data-selected", out AttributeValue) && AttributeValue != null &&
                 AttributeValue.Equals("true"))
             {
                 return(BlindSortType.Text.Trim());
             }
         }
     }
     catch (Exception GetBlindsSortTypeException)
     {
         throw GetBlindsSortTypeException;
     }
     return(null);
 }