public void Clear() { Do(() => { WebElement.Clear(); }); }
/// <summary> /// Clears the value of an element. /// </summary> public void Clear() { _session.Logger.WriteLine("Clearing " + this); if (WebElement.GetAttribute("readonly") == "true") { throw new InvalidOperationException("Cannot clear a readonly element."); } WebElement.Clear(); }
public void ClearFirstSendKeys(string text) { if (text == null) { text = string.Empty; } WebElement.Clear(); WebElement.SendKeys(text); }
public void SetPassword(string text) { WebElement.Clear(); // clear the text field WebElement.SendKeys(text); // set the new value in the text field string message = $"The (Text Field) [ {ControlName} ] set the password value: [ *********** ]."; LoggerManagerClass.Instance.Information(message); TestCaseProvider.Instance.AddStepInCurrentTestCase(LogStepStatus.Passed, message); }
/// <summary> /// Clear the element content. This is usually used on a user editable field element. /// </summary> public void Clear() { if (WebElement != null) { WebElement.Clear(); } else { LogManager.Error("Unable to clear the requested element"); } }
public void SetDateValue(string text) { WebElement.Clear(); // clear the text field SeleniumActions.BrowserSleep(10); WebElement.SendKeys(text); // set the new value in the text field string message = $"The (Text Field) [ {ControlName} ] set the value: [ {text} ]."; LoggerManagerClass.Instance.Information(message); TestCaseProvider.Instance.AddStepInCurrentTestCase(LogStepStatus.Passed, message); }
public void SetValue(string Text) { try { WebElement.Clear(); } finally { WebElement.SendKeys(Text); } }
/// <summary> /// Sends text to the element via keystrokes. If this element is a select element, then this selects the appropriate option instead of sending keystrokes. /// </summary> /// <param name="text">The text to send.</param> public void Write(string text) { _session.Logger.WriteLine("Writing " + text + " to " + this); if (WebElement.TagName != "select") { if (WebElement.GetAttribute("readonly") == "true") { throw new InvalidOperationException("Cannot write to a readonly element."); } WebElement.Clear(); WebElement.SendKeys(text); return; } var option = _session.FindElements(WebElement, "option[text()=" + Utility.CssString(text) + "] | option[@value=" + Utility.CssString(text) + "]").FirstOrDefault(); if (option == null) { throw new InvalidDataException("Element " + this + " does not contain option " + text); } option.WebElement.Click(); }
public void Clear() { LOG.Information("Clearing element: {0}", WebElement); WebElement.Clear(); }
public void Clear() { WebElement.Clear(); }
/// <summary> /// Removes content of element. /// </summary> public ElementWrapper Clear() { WebElement.Clear(); Wait(); return(this); }
public void SetValue(string text) { WebElement.Clear(); WebElement.SendKeys(text); //LOG }
void IWebElement.Clear() { WebElement.Clear(); }
public void SetText(string text) { WebElement.Clear(); WebElement.SendKeys(text); }
public void Fill(string value) { WebElement.Clear(); WebElement.SendKeys(value); }
public void Clear() { DoAction(() => WebElement.Clear()); }
public void SetText(string text) { // Clear the text box prior to entry WebElement.Clear(); WebElement.SendKeys(text); }
public void ClearText() { WebElement.Clear(); WebElement.SendKeys(Keys.Enter); }
public virtual void Clear() { WebElement.Click(); WebElement.Clear(); }
public void ClearText() { EnsureElementExists(); WebElement.Clear(); }
public void SetValue(string Text) { WebElement.Clear(); WebElement.SendKeys(Text); }
public void SendKeys(string keys) { EnsureElementExists(); WebElement.Clear(); WebElement.SendKeys(keys); }