MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / Clear

Method Clear

dotnet/src/webdriver/WebElement.cs:297–303  ·  view source on GitHub ↗

Clears the content of this element. If this element is a text entry element, the method will clear the value. It has no effect on other elements. Text entry elements are defined as elements with INPUT or TEXTAREA tags. Thrown when the target element is no longer valid in the document DOM.</

()

Source from the content-addressed store, hash-verified

295 /// are defined as elements with INPUT or TEXTAREA tags.</remarks>
296 /// <exception cref="StaleElementReferenceException">Thrown when the target element is no longer valid in the document DOM.</exception>
297 public virtual void Clear()
298 {
299 Dictionary<string, object> parameters = new Dictionary<string, object>();
300 parameters.Add("id", this.Id);
301
302 this.Execute(DriverCommand.ClearElement, parameters);
303 }
304
305 /// <summary>
306 /// Clicks this element.

Callers

nothing calls this directly

Calls 2

ExecuteMethod · 0.95
AddMethod · 0.45

Tested by

no test coverage detected