public static string GetButtonText(By Locator) { element = GenericHelper.GetElement(Locator); if (element.GetAttribute("value") == null) { return(String.Empty); } else { return(element.GetAttribute("value")); } }
public static bool IsCheckBoxChecked(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 IList <string> GetAllItem(By Locator) { select = new SelectElement(GenericHelper.GetElement(Locator)); return(select.Options.Select((x) => x.Text).ToList()); }
public static void SelectElementByValue(By locator, string valueTexts) { select = new SelectElement(GenericHelper.GetElement(locator)); select.SelectByValue(valueTexts); }
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 CheckedCheckBox(By Locator) { element = GenericHelper.GetElement(Locator); element.Click(); }
public static void ClickRadioButton(By Locator) { element = GenericHelper.GetElement(Locator); element.Click(); }
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 void ClickLink(By Locator) { element = GenericHelper.GetElement(Locator); element.Click(); }
public static bool IsButtonEnabled(By Locator) { element = GenericHelper.GetElement(Locator); return(element.Enabled); }