Пример #1
0
 public static List <string> GetDropdownOptions(ElementSelector selector)
 {
     Highlighter.ConsoleWriteLine($"Common approach to get options list for dropdown ({selector.CSSSelector})...", ConsoleColor.Green);
     return(new List <string> {
         "Option1", "Option2", "Option3"
     });
 }
Пример #2
0
        public bool IsFieldPresent(string fieldId)
        {
            if (fieldId == Field.LastName)
            {
                Highlighter.ConsoleWriteLine($"Specific approach to check if element ({fieldId}) is present...", ConsoleColor.Red);
                return(false);
            }

            var elementSelector = GetElementSelector(ContextElement.Field, fieldId);

            return(Browser.IsElementPresent(elementSelector));
        }
        bool IUIFieldContext.IsFieldPresent(string fieldId)
        {
            //some specific stuff so interface is reasonable
            if (fieldId == Field.LastName)
            {
                Highlighter.ConsoleWriteLine($"Specific approach to check if element ({fieldId}) is present...", ConsoleColor.Red);
                return(false);
            }

            var elementSelector = GetElementSelector(ContextElement.Field, fieldId);

            return(Browser.IsElementPresent(elementSelector));
        }
Пример #4
0
 public static bool IsElementPresent(ElementSelector selector)
 {
     Highlighter.ConsoleWriteLine($"Common approach to check if element ({selector.CSSSelector}) is present...", ConsoleColor.Green);
     return(selector != null);
 }