public static void InputKeyWithWait(this By element, string input) { Wait.UntilElementIsDisplayed(element); element.ClearData(); for (int i = 0; i < input.Length; i++) { element.GetElement().SendKeys(input[i].ToString()); } }
public static void InputKey(this By element, string input) { element.ClearData(); int textLength = element.GetElementValueByAttribute("value").Length; while (textLength > 0) { textLength--; element.SendKeys(Keys.Backspace); } for (int i = 0; i < input.Length; i++) { element.GetElement().SendKeys(input[i].ToString()); } }
public static void SendKeysWithClear(this By elementLocator, string text) { elementLocator.ClearData(); elementLocator.SendKeys(text); }
public static void ClearWithWait(this By elementLocator, TimeSpan?customTimeout = null) { Wait.UntilElementIsDisplayed(elementLocator, customTimeout); elementLocator.ClearData(); }