예제 #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"));
        }
예제 #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();
 }
예제 #8
0
 public static void TypeInTextBox(By Locator, string text)
 {
     element = GenericHelper.GetElement(Locator);
     element.SendKeys(text);
 }
예제 #9
0
 public static void ClearTextBox(By Locator)
 {
     element = GenericHelper.GetElement(Locator);
     element.Clear();
 }
예제 #10
0
 public static string GetButtonText(By locator)
 {
     _element = GenericHelper.GetElement(locator);
     return(_element.GetAttribute("value") == null ? " " : _element.GetAttribute("value"));
 }
예제 #11
0
 public static bool IsButtonEnabled(By locator)
 {
     _element = GenericHelper.GetElement(locator);
     return(_element.Enabled);
 }