public static bool IsCheckBoxChecked(By locator) { _element = GenericHelper.GetElement(locator); var checkBox = _element.GetAttribute("type"); if (checkBox != null) //(checkBox == null) if true code { return(false); } else { return(checkBox.Equals("checkbox") || checkBox.Equals("true")); } }
public static bool IsRadioButtonSelected(By locator) { _element = GenericHelper.GetElement(locator); var radioButtonStatus = _element.GetAttribute("checked"); if (radioButtonStatus != null) //(checkBox == null) if true code { return(radioButtonStatus.Equals("true") || radioButtonStatus.Equals("checked")); } else { return(false); } }
public static IList <string> AllDropdownMenuItem(By locator) { _select = new SelectElement(GenericHelper.GetElement(locator)); return(_select.Options.Select(x => x.Text).ToList()); }
public static void SelectElementByValue(By locator, string visibleText) { _select = new SelectElement(GenericHelper.GetElement(locator)); _select.SelectByValue(visibleText); }
public static void SelectElementByIndex(By locator, int indextValue) { _select = new SelectElement(GenericHelper.GetElement(locator)); _select.SelectByIndex(indextValue); }
public static void CheckACheckBox(By locator) { _element = GenericHelper.GetElement(locator); _element.Click(); }
public static void ClickLink(By locator) { _element = GenericHelper.GetElement(locator); _element.Click(); }
public static void ClickRadioButton(By locator) { _element = GenericHelper.GetElement(locator); _element.Click(); }
public static void ClearText(By locator) { _element = GenericHelper.GetElement(locator); _element.Clear(); }
public static void SendText(By locator, string text) { _element = GenericHelper.GetElement(locator); _element.SendKeys(text); }
public static bool IsButtonEnable(By locator) { _element = GenericHelper.GetElement(locator); return(_element.Enabled); }