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")); }
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(); }
public static string GetButtonText(By locator) { _element = GenericHelper.GetElement(locator); return(_element.GetAttribute("value") == null ? " " : _element.GetAttribute("value")); }
public static bool IsButtonEnabled(By locator) { _element = GenericHelper.GetElement(locator); return(_element.Enabled); }