Esempio n. 1
0
        public static bool IsChecked(By locator)
        {
            _element = GenericHelper.GetElement(locator);
            string flag = _element.GetAttribute("checked");

            return(flag == null);
        }
        public static bool IsRadioButtonSelected(By locator)
        {
            _element = GenericHelper.GetElement(locator);
            string flag = _element.GetAttribute("checked");

            if (flag == null)
            {
                return(false);
            }
            return(flag.Equals("true") || flag.Equals("checked"));
        }
Esempio n. 3
0
 public void CheckBox(By locator)
 {
     _element = GenericHelper.GetElement(locator);
     _element.Click();
 }
 public static IList <string> GetAllItem(By locator)
 {
     _select = new SelectElement(GenericHelper.GetElement(locator));
     return(_select.Options.Select((x) => x.Text).ToList());
 }
 public static void SelectElement(By locator, string text)
 {
     _select = new SelectElement(GenericHelper.GetElement(locator));
     _select.SelectByValue(text);
 }
 public static void SelectElement(By locator, int index)
 {
     _select = new SelectElement(GenericHelper.GetElement(locator));
     _select.SelectByIndex(index);
 }
 public static void ClickRadioButton(By locator)
 {
     _element = GenericHelper.GetElement(locator);
     _element.Click();
 }
 public static void TypeInTextBox(By Locator, string text)
 {
     element = GenericHelper.GetElement(Locator);
     element.SendKeys(text);
 }
 public static void ClearTextBox(By Locator)
 {
     element = GenericHelper.GetElement(Locator);
     element.Clear();
 }
Esempio n. 10
0
 public static string GetButtonText(By locator)
 {
     _element = GenericHelper.GetElement(locator);
     return(_element.GetAttribute("value") == null ? " " : _element.GetAttribute("value"));
 }
Esempio n. 11
0
 public static bool IsButtonEnabled(By locator)
 {
     _element = GenericHelper.GetElement(locator);
     return(_element.Enabled);
 }