public static string GetButtonText(By locator) { element = GenericHelper.GetElement(locator); if (element.GetAttribute("value") == null) { return(string.Empty); } return(element.GetAttribute("value")); }
public static bool IsRadioButtonSelected(By locator) { element = GenericHelper.GetElement(locator); string flag = element.GetAttribute("checked"); if (flag == null) { return(false); } else { return(flag.Equals("true") || flag.Equals("checked")); } }
public static void ClickRadioButton(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 visibleText) { select = new SelectElement(GenericHelper.GetElement(locator)); select.SelectByValue(visibleText); }
public static void SelectElement(By locator, int index) { select = new SelectElement(GenericHelper.GetElement(locator)); select.SelectByIndex(index); }
public static void ClearTextBox(By locator) { element = GenericHelper.GetElement(locator); element.Clear(); }
public static void TypeInTextBox(By locator, string text) { element = GenericHelper.GetElement(locator); element.SendKeys(text); }
public static bool IsButtonEnabled(By locator) { element = GenericHelper.GetElement(locator); return(element.Enabled); }
public static void CheckedCheckBox(By locator) { element = GenericHelper.GetElement(locator); element.Click(); }
public static void ClickLink(By locator) { element = GenericHelper.GetElement(locator); element.Click(); }